TcxCustomDataController.FilteredRecordCount Property
In This Article
Returns the number of records that meet the active filter criteria.
#Declaration
Delphi
property FilteredRecordCount: Integer read;
#Property Value
Type | Description |
---|---|
Integer | The number of records that meet the active filter criteria. This property value equals the Record |
#Remarks
You can use FilteredRecordCount
and FilteredRecordIndex properties to iterate through all records that meet the active filter criteria.
#Code Example: Iterate through Records after Filtering
The following code example iterates through all records that meet the active filter criteria and populates a TcxMemo editor with values of the first field in the underlying dataset:
uses
cxGridDBDataDefinitions; // This unit declares the TcxGridDBDataController class
// ...
var
ADataController: TcxGridDBDataController;
I: Integer;
begin
cxMemo1.Lines.Clear;
ADataController := cxGrid1DBTableView1.DataController;
for I := 0; to ADataController.FilteredRecordCount - 1 do
cxMemo1.Lines.Add(ADataController.DisplayTexts[ADataController.FilteredRecordIndex[I], 0]);
end;
See Also