Skip to main content

FilterCondition Enum

Contains enumeration values that specify comparison operation types used to create filter conditions.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v24.1.dll

NuGet Package: DevExpress.Data

Declaration

public enum FilterCondition

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.

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’.

See Also