All docs
V21.1
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

WebFilter.CriteriaString Property

Gets or sets the filter expression as a string.

Namespace: DevExpress.Web.ASPxPivotGrid.Data

Assembly: DevExpress.Web.ASPxPivotGrid.v21.1.dll

Declaration

[DefaultValue("")]
public string CriteriaString { get; set; }

Property Value

Type Default Description
String

String.Empty

A String value that specifies the filter expression as a string.

Remarks

You can set the filter expression as a string and assign it to the CriteriaString property. Another way is to assign the filter expression to the Criteria 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