Skip to main content
Table of Contents

TTMSFNCCustomDataGrid.Sort Method

Sorts all data rows by the specified column and direction.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCCustomDataGrid

Overloads

Overload 1

Sorts all data rows by the specified column and direction.

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

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

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

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