Skip to main content
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.

FMX.TMSFNCDataGridData.hppPascalC++
procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection); reintroduce; overload;
void __fastcall Sort(int AColumn, TTMSFNCDataGridSortDirection ADirection)/* 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.

FMX.TMSFNCDataGridData.hppPascalC++
procedure Sort(AColumn: Integer; ADirection: TTMSFNCDataGridSortDirection; AFromRow, AToRow: Integer); reintroduce; overload;
void __fastcall Sort(int AColumn, TTMSFNCDataGridSortDirection ADirection, int AFromRow, int AToRow)/* 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.

FMX.TMSFNCDataGridData.hppPascalC++
procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;
void __fastcall Sort(System::DynamicArray<int> AColumns, System::DynamicArray<TTMSFNCDataGridSortDirection> ADirections, _di_TTMSFNCDataGridDataCustomCompareCallback ACustomCompareCallback = _di_TTMSFNCDataGridDataCustomCompareCallback(), _di_TTMSFNCDataGridDataGetSortOptionsCallback ASortOptionsCallback = _di_TTMSFNCDataGridDataGetSortOptionsCallback())/* 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.

FMX.TMSFNCDataGridData.hppPascalC++
procedure Sort(AColumns: TArray<Integer>; ADirections: TArray<TTMSFNCDataGridSortDirection>; AFromRow, AToRow: Integer; ACustomCompareCallback: TTMSFNCDataGridDataCustomCompareCallback = nil; ASortOptionsCallback: TTMSFNCDataGridDataGetSortOptionsCallback = nil); reintroduce; overload;
void __fastcall Sort(System::DynamicArray<int> AColumns, System::DynamicArray<TTMSFNCDataGridSortDirection> ADirections, int AFromRow, int AToRow, _di_TTMSFNCDataGridDataCustomCompareCallback ACustomCompareCallback = _di_TTMSFNCDataGridDataCustomCompareCallback(), _di_TTMSFNCDataGridDataGetSortOptionsCallback ASortOptionsCallback = _di_TTMSFNCDataGridDataGetSortOptionsCallback())/* 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.