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

TcxDBDataFilterCriteria.OnFormatFilterTextValue Event

In This Article

Enables you to format the values within the filter string that is applied to a dataset.

#Declaration

Delphi
property OnFormatFilterTextValue: TcxDBDataFilterFormatFilterTextValueEvent read; write;

#Remarks

If the AutoDataSetFilter property value is True, applying the filter criteria to a control results in filtering the underlying dataset. This means that the text stored in the FilterText property is assigned to the dataset’s Filter property. In some cases, the format of values in the constructed string may not match the format required by the dataset. This case is not usual and may appear only on particular dataset types and with particular value types. To resolve this issue, handle the OnFormatFilterTextValue event, which is raised for each value within the constructed filter string, and manually format the value so that it matches the format required by the dataset.

The filter criteria that generated this filter string can be obtained via the Sender parameter.

The AItem parameter provides access to the filter condition whose value (passed as the AValue parameter) is to be formatted.

Pass the formatted value as the ADisplayValue parameter. Initially, this parameter contains the text formatted using the default mechanism.

See Also