I am working on a custom column from Code Project were I want to persist a
value using the following code in the property HighlightBackgroundColor.
Note the default color is "Red" but when changing the value in the IDE
property editor to say blue and hit OK next time in the editor it's still
"Red." So I am looking to see if I am totally off base or missing something
small. Thanks for any insight.
Public Class DropDownListColumn
Inherits DataGridViewComboBoxColumn
Public Sub New()
'Set the type used in the DataGridView
Me.CellTemplate = New DropDownListCell
End Sub
Private mHighlightBackGroundColor As Color
<System.ComponentModel.Category("Behavior"), _
System.ComponentModel.Description("Sets highlight color"), _
System.ComponentModel.DefaultValue(GetType(Color), "Red")_
Public Property HighlightBackGroundColor() As Color
Get
Return mHighlightBackGroundColor
End Get
Set(ByVal value As Color)
mHighlightBackGroundColor = value
End Set
End Property
End Class