custom gridviw column

  • Thread starter Thread starter Louis-Pierre Dauphinais
  • Start date Start date
L

Louis-Pierre Dauphinais

Please help, easily reproduced:

1. Create a class inheriting from
System.Windows.Forms.DataGridViewTextBoxColumn .
2. Add a simple property to that class (see below for the code I used).
3. Add a column of that type to a DataGridView.
4. Try to set the property you just created using the "Edit Columns" dialog
at design time.
5. Close and reopen the dialog. The value is gone!

Am i doing something wrong? Setting the value in code works.

Thanks for any help.



Here's the class i used:

Public Class MyColumn
Inherits System.Windows.Forms.DataGridViewTextBoxColumn

Private _MyProperty As String
<System.ComponentModel.Category("MyProperties")> _
Public Property MyProperty() As String
Get
Return _MyProperty
End Get
Set(ByVal value As String)
_MyProperty = value
End Set
End Property

End Class
 
I tried your sample and get the same results. It has to be something
simple that we are overlooking. Can someone who has solved this one
please help out?
 
Louis,

To date I have not had any luck with this. I have read and tried a
number of options but nothing has worked. I thought it was as simple as
something not being wired correctly.
Have you had any luck with this.

Thanks,
Chip.
 
Back
Top