How to: Apply a Filter to a View
Example 1
This example demonstrates how to assign a filter to a View using the ColumnView.ActiveFilterString property.
gridView1.ActiveFilterString = "([ProductID] = 1 OR [ProductID] = 3 " +
"OR [ProductID] > 10) AND [Discount] = 0";
Example 2
The following code demonstrates how to create filter criteria and assign them to a Grid View via the ColumnView.ActiveFilterCriteria property. The criteria is created using the operators defined in the DevExpress.Data.Filtering namespace (the GroupOperator and BinaryOperator classes). The created criteria represent the filter expression: “[Extension] = ‘.gif’ OR [Extension] = ‘.png’”.