WebFilter Class
A class that provides settings for complex filters.
Namespace: DevExpress.Web.ASPxPivotGrid.Data
Assembly: DevExpress.Web.ASPxPivotGrid.v24.2.dll
Declaration
Related API Members
The following members return WebFilter objects:
Library | Related API Members |
---|---|
ASP.NET Web Forms Controls | ASPxPivotGrid.Filter |
ASP.NET MVC Extensions | PivotGridSettings.Filter |
Remarks
Use the ASPxPivotGrid.Filter property to get access to the WebFilter object.
A filter editor enables users to build complex filter criteria with an unlimited number of filter conditions, combined by logical operators. The resulting filter condition is combined with the field-based filter criteria by the AND Boolean operator.
The filter editor provides a set of logical operators that simplify the process of creating filters for text, numeric and date-time fields.
To apply a filter expression in code, use the WeFilter.Criteria or WebFilter.CriteriaString property.
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)
);
}