RAD Studio |  |

Setting Filter Options
See Also
Collapse All

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
foCaseInsensitive | Ignore case when comparing strings.
foNoPartialCompare | 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:

Copy Code

    FilterOptions := [foCaseInsensitive];
    Filter := 'State = ' + QuotedStr('CA');

Copy Code

    TFilterOptions FilterOptions;
    FilterOptions->Clear();
    FilterOptions << foCaseInsensitive;
    Table1->FilterOptions = FilterOptions;
    Table1->Filter = "State = "CA"";

See Also

Creating Filters

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!