Table of Contents

TTMSFNCDataGridData.Sort Method

Sorts all data rows by the values in AColumn.

API unit family: TMSFNCDataGridData Declaring type: TTMSFNCDataGridData

Overloads

Overload 1

Sorts all data rows by the values in AColumn.

procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection); reintroduce; overload;

Parameters

Name Description
AColumn Zero-based column index used by the operation.
ADirection Direction used by the operation.

Overload 2

Sorts only the rows in the specified range by the values in AColumn.

procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection; AFromRow, AToRow: Integer); reintroduce; overload;

Parameters

Name Description
AColumn Zero-based column index used by the operation.
ADirection Direction used by the operation.
AFromRow Zero-based row index used by the operation.
AToRow Zero-based row index used by the operation.

Overload 3

Multi-column sort; columns and directions are matched by index. Pass ACustomCompareCallback for a custom per-row comparer. Pass ASortOptionsCallback to supply per-column case-sensitivity and format options.

procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;

Parameters

Name Description
AColumns Zero-based column index used by the operation.
ADirections Direction used by the operation.
ACustomCompareCallback Callback invoked by the operation.
ASortOptionsCallback Callback invoked by the operation.

Overload 4

Multi-column sort with row range; columns and directions are matched by index.

procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; AFromRow, AToRow: Integer; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;

Parameters

Name Description
AColumns Zero-based column index used by the operation.
ADirections Direction used by the operation.
AFromRow Zero-based row index used by the operation.
AToRow Zero-based row index used by the operation.
ACustomCompareCallback Callback invoked by the operation.
ASortOptionsCallback Callback invoked by the operation.