Skip to main content
All docs
V25.1
  • ASPxPivotGrid.Filter Property

    Gets the filter settings.

    Namespace: DevExpress.Web.ASPxPivotGrid

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

    NuGet Package: DevExpress.Web

    Declaration

    [PivotAPIMemberCategory(APICategory.RelationalSource)]
    public WebFilter Filter { get; }

    Property Value

    Type Description
    WebFilter

    An object that contains the filter settings.

    Remarks

    The Filter property provides access to the WebFilter object that contains filter settings.

    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.

    ASPxPivotGrid_FilterEditor

    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)
          );
    }
    

    Note

    The filter expression is not supported in OLAP mode.

    See Also