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.v20.1.dll

Declaration

[Browsable(false)]
public CriteriaOperator FilterCriteria { get; set; }
<Browsable(False)>
Public Property FilterCriteria As CriteriaOperator

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