[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Performs actions needed when a mouse click occurs in a fixed header for a grid column or row.
Source position: grids.pas line 1127
protected procedure TCustomGrid.HeaderClick( |
IsColumn: Boolean; |
index: Integer |
); virtual; |
IsColumn |
|
True if the click occurred on a column header. False for a row header. |
index |
|
Column (or row) number for the header click. |
HeaderClick ensures that the value in SortOrder is toggled when Index contains the SortColumn defined for the grid control. SortOrder is set to soAscending when Index contains a column number other than SortColumn. SortColumn is updated in the method to use the value in Index as the active sort column.
HeaderClick calls the Sort method to sort all non-fixed rows in the grid control using the content from the column number in Index.
No actions are performed in the method when ColumnClickSorts is set to False.
IsColumn indicates whether the header click applies to a column or a row. When set to True, the mouse click occurred in a fixed header for the column number in Index. This parameter implies that similar handling is provided in the method for a header click on a fixed header in a row. No actions are performed for a header click on a row.
HeaderClick is overridden in descendent classes like TCustomDrawGrid to perform additional actions.
HeaderClick is called from methods like DialogChar and MouseUp.
|
Column number used to sort the rows in the grid. |
|
|
Controls the order used for the sort column (ascending or descending). |
|
|
Indicates if clicking a column header changes its sort order. |
|
|
Applies an accelerator key for a column in the grid. |
|
|
Handles a mouse up event for the grid control. |
|
|
Performs actions when a mouse click occurs in a header for a grid column. |
Version 4.0 | Generated 2025-05-03 | Home |