Skip to main content
Table of Contents

TTMSFNCDataGridDatabaseAdapter.OnSortData Event

Fires when the grid's sort order must be applied to the dataset, and replaces the adapter's built-in sorting when assigned.

API unit family: TMSFNCDataGridDatabaseAdapter Declaring type: TTMSFNCDataGridDatabaseAdapter Inherited from: TTMSFNCCustomDataGridDatabaseAdapter Type: TNotifyEvent

Syntax

FMX.TMSFNCDataGridDatabaseAdapter.hppPascalC++
property OnSortData: TNotifyEvent;
__property System::Classes::TNotifyEvent OnSortData = {read=FOnSortData, write=FOnSortData};

Remarks

Read the grid's sort columns and directions and sort the dataset yourself, for example by changing a query's ORDER BY clause; this is needed for datasets other than client datasets, FireDAC datasets, and the product's own custom dataset. The handler runs between DisableControls and EnableControls, and the grid reloads afterwards. Fires only when sorting is passed to the dataset, that is in almBuffered mode.

Parameters

Name Description
Sender The adapter that fires the event.