Setting Filter Options

From RAD Studio
Jump to: navigation, search

Go Up to Displaying and Editing a Subset of Data Using Filters

The FilterOptions property lets you specify whether a filter that compares string-based fields accepts records based on partial comparisons and whether string comparisons are case-sensitive. FilterOptions is a set property that can be an empty set (the default), or that can contain either or both of the following values:

FilterOptions values :

Value Meaning


Ignore case when comparing strings.


Disable partial string matching; that is, don't match strings that end with an asterisk (*).

For example, the following statements set up a filter that ignores case when comparing values in the State field:

FilterOptions := [foCaseInsensitive];
Filter := 'State = ' + QuotedStr('CA');
TFilterOptions FilterOptions;
FilterOptions << foCaseInsensitive;
Table1->FilterOptions = FilterOptions;
Table1->Filter = "State = "CA"";

See Also