aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-data-dot-webfilter-37707df9.md
Gets or sets the filter expression.
Namespace : DevExpress.Web.ASPxPivotGrid.Data
Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(null)]
public CriteriaOperator Criteria { get; set; }
<DefaultValue(Nothing)>
Public Property Criteria As CriteriaOperator
| Type | Default | Description |
|---|---|---|
| CriteriaOperator | null |
A CriteriaOperator descendant that represents the filter expression.
|
You can assign the filter expression to the Criteria property. Another way is to set a filter expression as a string and assign it to the CriteriaString property.
The code snippet below shows how to apply filters in two ways:
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack && !IsCallback)
//ASPxPivotGrid1.Filter.CriteriaString = "[" + fieldOrderYear.ID + "] = 2018 AND [" + fieldOrderQuarter.ID + "] between (2, 4)";
ASPxPivotGrid1.Filter.Criteria =
CriteriaOperator.And(
new BinaryOperator(fieldOrderYear.ID, 2018, BinaryOperatorType.Equal),
new BetweenOperator(fieldOrderQuarter.ID, 2, 4)
);
}
Note
The filter expression is not supported in OLAP mode.
See Also