Skip to main content

ColumnView.ActiveFilterCriteria Property

Gets or sets the current filter criteria.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid


public CriteriaOperator ActiveFilterCriteria { get; set; }

Property Value

Type Description

A CriteriaOperator object which represents the total filter criteria.


You can use the ActiveFilterCriteria property to specify the filter criteria in code, using CriteriaOperator objects. To specify the filter criteria in string format, see the ColumnView.ActiveFilterString property.


The following code demonstrates how to create the following filter criteria via the ColumnView.ActiveFilterCriteria property, using the GroupOperator and BinaryOperator objects:

“[Extension] = ‘.gif’ OR [Extension] = ‘.png’”

using DevExpress.Data.Filtering;

CriteriaOperator expr1 = new BinaryOperator("Extension", ".gif");
CriteriaOperator expr2 = new BinaryOperator("Extension", ".png");
gridView1.ActiveFilterCriteria = GroupOperator.Or(new CriteriaOperator[] { expr1, expr2 });

To temporarily disable the filter, use the ColumnView.ActiveFilterEnabled option.

The ActiveFilterCriteria and ColumnView.ActiveFilterString properties can’t be used to filter data against a field that isn’t represented by a column in the current View.

The ActiveFilterCriteria property is equivalent to the ViewFilter.Criteria property of the ColumnView.ActiveFilter object.

For more information on filtering, see Filter and Search.

See Also