Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

#Declaration

[Browsable(false)]
public CriteriaOperator FilterCriteria { get; set; }

#Property Value

Type Description
CriteriaOperator

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

#Remarks

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