Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomDataController.FilteredIndexByRecordIndex Property

Returns the position of a data record in the list of filtered records.

#Declaration

Delphi
property FilteredIndexByRecordIndex[Index: Integer]: Integer read;

#Property Value

Type
Integer

#Remarks

The FilteredIndexByRecordIndex property returns the position of a record in the list of filtered records. The record required is identified by its index via the Index parameter.

The value returned is the index of a record within the list of filtered records. It can vary from 0 to FilteredRecordCount - 1. If a specific record doesn’t belong to the list of filtered records (it doesn’t meet the filter criteria set), the FilteredIndexByRecordIndex returns -1.

The following code tests whether a particular record in a data controller meets the current filter criteria.

function IsFiltered(ADataController: TcxCustomDataController; ARecordIndex: Integer): Boolean;
begin
  Result := ADataController.FilteredIndexByRecordIndex[ARecordIndex] <> -1;
end;
See Also