FilterCondition Enum
Contains enumeration values that specify comparison operation types used to create filter conditions.
Namespace: DevExpress.Data.Filtering
Assembly: DevExpress.Data.v18.1.dll
Declaration
Members
Name | Description |
---|---|
Contains
|
Specifies the Contains comparison operation. |
StartsWith
|
Specifies the StartsWith comparison operation. |
Like
|
Specifies the Like comparison operation. |
Default
|
Specifies the default comparison operation. |
Equals
|
Specifies the Equals comparison operation. |
Related API Members
The following properties accept/return FilterCondition values:
Library | Related API Members |
---|---|
WinForms Controls | RepositoryItemSearchControl.FilterCondition |
WPF Controls | AccordionControl.SearchControlFilterCondition |
DataViewBase.SearchPanelFindFilter | |
LookUpEditBase.FilterCondition | |
LookUpEditSettingsBase.FilterCondition | |
SearchControl.FilterCondition | |
Windows 10 App Controls | DataControlBase.SearchPanelFindFilter |
Remarks
The FilterCondition.Like operator determines whether a specific character string matches a specified pattern or not.
The following wildcard characters are supported:
% matches a string of zero or more characters. For instance:
CriteriaOperator.Parse(“Name like ‘Jo%’”) - returns all the objects whose Name begins with ‘Jo’.
CriteriaOperator.Parse(“Name like ‘%car%’”) - returns all the objects whose Name contains the ‘car’ substring.
_ matches a single character. For instance:
CriteriaOperator.Parse(“Name like ‘car_’”) - returns all the objects whose Names consist of four characters and begin with ‘car’.
[ ] identifies a single character within the specified range ([a-c]) or set ([abc]). For instance:
CriteriaOperator.Parse(“Name like ‘[A-C]%’”) - returns all the objects whose Name begins with ‘A’, ‘B’ or ‘C’.
[^] excludes a single character not within the specified range ([^a-c]) or set ([^abc]). For instance:
CriteriaOperator.Parse(“Name like ‘re[^de]%’”) - returns all the objects whose Name begins with ‘re’, and where the following letter is not ‘d’ or ‘e’.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterCondition enum.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.