Skip to main content

TcxVirtualVerticalGrid.OnFilterRecord Event

Fires when the data controller is about to perform internal filtering.

Declaration

property OnFilterRecord: TcxDataFilterRecordEvent read; write;

Remarks

Implement the OnFilterRecord event handler to provide custom filter conditions.

The ADataController parameter specifies the data controller.

The ARecordIndex parameter specifies the record index.

The Accept parameter specifies the visibility of the filtered records. Set the Accept parameter to True to make the filtered records visible or to False to hide the filtered records.

Consider the following example:

Accept := ADataController.Values[ARecordIndex, fldTrademark.Properties.ItemIndex] = 'BMW';

The fldTrademark is a dataset field containing information about car trademarks. When the above code is run only records with a value of ‘BMW’ in the fldTrademark field will be loaded.

Note

If your OnFilterRecord event handler implementation is not thread-safe, we recommend that you disable the use of multi-threaded algorithms for record filtering operations via the vertical grid’s OptionsData.MultiThreadedFiltering property.

See Also