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
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.
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'";