Custom DataGridView column property problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin S Gallagher

    #1

    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 HighlightBackgr oundColor.
    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 DropDownListCol umn
    Inherits DataGridViewCom boBoxColumn

    Public Sub New()
    'Set the type used in the DataGridView
    Me.CellTemplate = New DropDownListCel l
    End Sub

    Private mHighlightBackG roundColor As Color
    <System.Compone ntModel.Categor y("Behavior") , _
    System.Componen tModel.Descript ion("Sets highlight color"), _
    System.Componen tModel.DefaultV alue(GetType(Co lor), "Red")_
    Public Property HighlightBackGr oundColor() As Color
    Get
    Return mHighlightBackG roundColor
    End Get
    Set(ByVal value As Color)
    mHighlightBackG roundColor = value
    End Set
    End Property

    End Class


Working...