1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| Partial Public Class MyDataGridView
Private Class ExDataGridViewRow
Inherits DataGridViewRow
Dim MyGroup As RowsGroup
Dim mIsGrouped As Boolean
Public Overrides Function Clone() As Object
Dim Obj As ExDataGridViewRow
Obj = CType(MyBase.Clone(), DataGridViewRow)
Obj.Group = Group
Obj.mIsGrouped = mIsGrouped
Return Obj
End Function
Property Group As RowsGroup
Get
Return MyGroup
End Get
Set(value As RowsGroup)
MyGroup = value
End Set
End Property
ReadOnly Property HeaderOfGroup As Boolean
Get
If Not IsNothing(MyGroup) Then
If Me.Index = MyGroup.ListOfRow(0).Index Then
Return True
Else
Return False
End If
Else
Return False
End If
End Get
End Property
Property IsGrouped As Boolean
Get
Return mIsGrouped
End Get
Set(value As Boolean)
mIsGrouped = value
End Set
End Property
End Class
End Class |
Partager