Skip to main content

PivotGridControl.FilterCriteria Property

Gets or sets a filter applied to the PivotGridControl. This is a dependency property.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v23.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid


public CriteriaOperator FilterCriteria { get; set; }

Property Value

Type Description

A DevExpress.Data.Filtering.CriteriaOperator object which is a filter criterion.


The following code snippet illustrates how to create filter criteria that are a DevExpress.Data.Filtering.CriteriaOperator descendant and assign them to the FilterCriteria property:

pivotGridControl1.FilterCriteria = (
    new BinaryOperator("OrderDate", new DateTime(2018, 1, 1), BinaryOperatorType.Less) &
    new BinaryOperator("UnitPrice", 10, BinaryOperatorType.Less)) |
    ( new BinaryOperator("OrderDate", new DateTime(2019, 1, 1), BinaryOperatorType.GreaterOrEqual) &
    new BinaryOperator("UnitPrice", 100, BinaryOperatorType.GreaterOrEqual));

You can obtain filter criteria by parsing a filter string with the static CriteriaOperator.Parse method:

pivotGridControl1.FilterCriteria =
    CriteriaOperator.Parse("([OrderDate] < #1/1/2018# AND [UnitPrice] < 10)" +
    " OR ([OrderDate] >= #1/1/2019# AND [UnitPrice] >= 100)");
See Also