TcxDBDataFilterCriteria.OnFormatFilterTextValue Event
Enables you to format the values within the filter string that is applied to a dataset.
Declaration
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.