Skip to main content
Table of Contents

TTMSFNCDataGridDatabaseAdapter.OnGetRecordCount Event

Fires each time the adapter determines the number of records, allowing the value to be corrected.

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

Syntax

FMX.TMSFNCDataGridDatabaseAdapter.hppPascalC++
OnGetRecordCount: TTMSFNCDataGridDatabaseAdapterGetRecordCountEvent;
__property TTMSFNCDataGridDatabaseAdapterGetRecordCountEvent OnGetRecordCount = {read=FOnGetRecordCount, write=FOnGetRecordCount};

Remarks

Use this for datasets whose RecordCount is unreliable or expensive. The value sizes the grid rows and, in almAllRecords mode, the record buffer, so it must not exceed the number of records the dataset can deliver. See also DynamicRecordCount.

Parameters

Name Description
Sender The adapter that fires the event.
ARecordCount On entry, the dataset's RecordCount (plus one while inserting, or 1 in dsSetKey state). Assign the number of data rows the grid should show.