Setting Filter Options
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 |
---|---|
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:
FilterOptions := [foCaseInsensitive]; Filter := 'State = ' + QuotedStr('CA');
TFilterOptions FilterOptions; FilterOptions->Clear(); FilterOptions << foCaseInsensitive; Table1->FilterOptions = FilterOptions; Table1->Filter = "State = "CA"";