RAD Studio
ContentsIndex
PreviousUpNext
Setting Filter Options

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"";
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!