Object Reference > True DBGrid Events > GroupColMove Event |
GroupColMove Event
The GroupColMove event occurs before a selected column is moved to or from the grouping area.
TDBGrid_GroupColMove (ByVal Position As Integer, ByVal ColIndex As Integer, Cancel As Integer)
Arguments
Position is an integer that specifies the target location of the selected columns.
ColIndex is an integer that identifies the column being moved. This is the absolute index.
Cancel is an integer that may be set to True to prohibit movement.
Event applies to TDBGrid control (OLE DB only).
Your event procedure can either accept the movement or cancel it altogether.
The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge. A position of -1 is used to indicate that a column is being moved from the grouping area back to the grid.
To determine which column is being moved, use the Item method.
If you set the Cancel argument to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.
Note
This property is only supported by the OLE DB version of True DBGrid Pro.
See Outlook-Style Grouping for more information.