Imports System.Drawing
Imports System.Windows.Forms
Imports System.ComponentModel

''' <summary>
''' Represents a data grid check box column that can be highlighted.
''' </summary>
''' <remarks></remarks>
Public Class MarkableDataGridCheckBoxColumn
    Inherits MarkableDataGridColumnBase

    Private _nullValue As Object = DBNull.Value

#Region "Properties"

    ''' <summary>
    ''' Gets or sets the displayable null value.
    ''' </summary>
    ''' <returns>The displayable null value.</returns>
    ''' <remarks></remarks>
    Public Overrides Property NullValue() As Object
        Get
            Return Me._nullValue
        End Get
        Set(ByVal value As Object)
            Me._nullValue = value
            Me.Invalidate()
        End Set
    End Property

    ''' <summary>
    ''' Gets the HostedControl as a CheckBox.
    ''' </summary>
    ''' <returns>HostedControl as a CheckBox.</returns>
    ''' <remarks></remarks>
    Public Overridable ReadOnly Property CheckBox() As CheckBox
        Get
            Return CType(Me.HostedControl, CheckBox)
        End Get
    End Property

#End Region

    Protected Overrides Function GetBoundPropertyName() As String
        Return "CheckBox"
    End Function

    Protected Overrides Function CreateHostedControl() As System.Windows.Forms.Control
        Return Nothing
    End Function

End Class
