# Filter Expressions | WPF Controls | DevExpress Documentation

To filter data, you should create a filter expression(s). The simplest filter has the following syntax: “[Price] = 10”. This selects records that have **10** in the **Price** column.

The following table lists the available comparison operators:

| Comparison Operator | Description | Example |
| --- | --- | --- |
| **=** | Equal to.<br><br><br>The operator can be applied to numeric, date-time, string and Boolean values. | `[ProductID] = 999` |
| **&gt;** | Greater than.<br><br><br>The operator can be applied to numeric, date-time and string values. | `[ProductName] > 'Uncle'` |
| **&lt;** | Less than.<br><br><br>The operator can be applied to numeric, date-time and string values. | `[UnitsInStock] < 100` |
| **&gt;=** | Greater than or equal to.<br><br><br>The operator can be applied to numeric, date-time and string values. | `[BirthDate] >= #01/01/1980#` |
| **&lt;=** | Less than or equal to.<br><br><br>The operator can be applied to numeric, date-time and string values. | `[CreatedDate] <= #10/2/2006#` |
| **&lt;&gt;**<br><br><br>**!=** | Not equal to.<br><br><br>The operator can be applied to numeric, date-time, string and Boolean values. | `[Priority] <> 'Low'` |
| **LIKE** | Operator ‘LIKE’.<br><br><br>The operator is used for partial string comparison. It returns TRUE if the value being tested matches the specified pattern.<br><br><br>You can use the ‘%’ and ‘\_’ symbols as wildcards in patterns. The ‘%’ wildcard substitutes any number of characters.  The ‘\_’ character is used to show any single character. | `[ProductName] LIKE '%Sauce%'` |
| **NOT LIKE** | Operator ‘NOT LIKE’.<br><br><br>The operator is used for partial string comparison. It returns TRUE if the value being tested does not match the specified pattern. See the description of the LIKE operator for more information. | `[IssueSubject] NOT LIKE 'Help:%'` |
| **IS NULL** | Checks whether the value being tested is the NULL value. | `[Region] IS NULL` |
| **IS NOT NULL** | Checks whether the value being tested is not the NULL value. | `[Region] IS NOT NULL` |

Note

String constants must be enclosed within single quote characters. If a single quote character needs to be included as a literal to a filter it must be doubled. Example:

`[ProductID] LIKE 'Uncle Bob''s%'`

Note

Date-time constants must be wrapped with the ‘#’ character and use a culture-independent (invariant) format.

`[CreatedDate] <= #07/30/2008#`

Note

WcfServerModeDataSource, WcfInstantFeedbackDataSource, and RiaInstantFeedbackDataSource do not support data filtering by the following conditions: Like, Not Like, DateTime conditions (Yesterday, Tomorrow, Last Week, etc.). To learn more, see [Server Mode Limitations](/WPF/6281/controls-and-libraries/data-grid/bind-to-data/server-mode-and-instant-feedback/server-mode-limitations).

See Also

[Criteria Language Syntax](/CoreLibraries/4928/devexpress-data-library/criteria-language-syntax)