VS2005 Another DataGridView Problem

F

Fernando Cardoso

On my Windows Forms app I have a base form called DataEntryForm. On this
form I have a DataGridView and a BindingSource populated with a base
EntityCollection. These controls are protected friend.

I have a second form called EmployeesForm inherited from DataEntryForm. I
changed the datasource of the BindingSource to an EmployeesEntityCollection.
It worked fine and the public properties of my custom entity class appeared
on the DataGridView.

If I change any property on the EmployeesForm controls and save the form, it
seems that the code generator will make something wrong. When I close the
form and open it again, its displayed the following error message:

"Duplicate component name 'LastNameDataGridViewTextBoxColumn'. Component
names must be unique and case-insensitive.
E:\Sistemas\Talento\talento.framework\Código\Talento.Framework.Teste\Forms\frmEmployees.Designer.vb"

I saw the code on frmEmployees.Designer.vb and it creates only one
LastNameDataGridViewTextBoxColumn. Also from what I know, I have no control
on the designer generated code, unless I create a new designer and a
DataGridView derived class.

How can I avoid this problem?

Please send any answer to my e-mail too.

Thanks in advance.

Fernando
 
F

Fernando Cardoso

Some more info...

If I delete the designer generated lines for the DataGridViewColumns the
form open on the designer with no problems.

The line where the error is generated on the frmEmployees.Designer.vb is:
Me.ResumeLayout(False)

It seems that other control have generated these columns...

Please send any answer to my e-mail too.

Thanks in advance.

Fernando
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top