470,855 Members | 1,208 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Custom DataGridView column property problem

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
Oct 14 '08 #1
0 1729

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Veeneman | last post: by
2 posts views Thread by Marc Solé | last post: by
1 post views Thread by David Veeneman | last post: by
8 posts views Thread by Brian Pelton | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.