Skip to main content
A newer version of this page is available.

Prefilter.Criteria Property

Gets or sets the Prefilter‘s expression.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v18.2.dll

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Criteria property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also