Skip to main content

Prefilter.Criteria Property

Gets or sets the Prefilter‘s expression.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.PivotGrid

Declaration

public override CriteriaOperator Criteria { get; set; }

Property Value

Type Description
CriteriaOperator

A CriteriaOperator object that represents the Prefilter‘s expression.

Remarks

Use the Criteria property to obtain the filter expression, which is specified by an end-user in the Prefilter editor. For more information, see the PivotGridControl.Prefilter property description.

xtrapivotgrid_prefilter

Note

The Prefilter is not supported in OLAP mode.

Example

The following code shows how to filter a Pivot Grid Control’s underlying data source using the Prefilter. The filter selects records that contain ‘USA’ or ‘UK’ strings in the Country field.

using DevExpress.Data.Filtering;

//...

pivotgridControl1.Prefilter.CriteriaString = "[" + fieldCountry.PrefilterColumnName + 
                "] = 'UK' OR [" + fieldCountry.PrefilterColumnName + "] = 'USA'";
See Also