TTMSFNCDataGrid.Sort Method
Sorts all data rows by the specified column and direction.
API unit family: TMSFNCDataGrid
Declaring type: TTMSFNCDataGrid
Inherited from: TTMSFNCCustomDataGrid
Overloads
Overload 1
Sorts all data rows by the specified column and direction.
procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection); reintroduce; overload;
Parameters
| Name | Description |
|---|---|
AColumn |
Zero-based column index to sort by. |
ADirection |
Sort direction (ascending or descending). |
Overload 2
Sorts rows within the given row range by the specified column and direction.
procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection; AFromRow, AToRow: Integer); reintroduce; overload;
Parameters
| Name | Description |
|---|---|
AColumn |
Zero-based column index to sort by. |
ADirection |
Sort direction (ascending or descending). |
AFromRow |
First row index of the range to sort. |
AToRow |
Last row index of the range to sort. |
Overload 3
Performs a multi-column sort with optional custom compare and sort options callbacks.
procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;
Parameters
| Name | Description |
|---|---|
AColumns |
Array of zero-based column indices defining the sort priority. |
ADirections |
Array of sort directions corresponding to AColumns. |
ACustomCompareCallback |
Optional callback for custom value comparison. |
ASortOptionsCallback |
Optional callback to supply per-column sort options. |
Overload 4
Performs a multi-column sort over a limited row range with optional callbacks.
procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; AFromRow, AToRow: Integer; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;
Parameters
| Name | Description |
|---|---|
AColumns |
Array of zero-based column indices defining the sort priority. |
ADirections |
Array of sort directions corresponding to AColumns. |
AFromRow |
First row index of the range to sort. |
AToRow |
Last row index of the range to sort. |
ACustomCompareCallback |
Optional callback for custom value comparison. |
ASortOptionsCallback |
Optional callback to supply per-column sort options. |