Skip to main content
A newer version of this page is available. .
All docs
V21.2

DataSourceAdapterBase.FilterCriteria Property

Gets or sets the filter expression that is applied to the series to filter display data.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v21.2.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Data)]
public CriteriaOperator FilterCriteria { get; set; }

Property Value

Type Description
CriteriaOperator

The filter criteria.

Remarks

Use the FilterCriteria property to create a filter expression that consists of multiple conditions applied to multiple data columns, and apply it to the series data. When you set the FilterCriteria property to a new value, applied filters are reset.

Note that the FilterCriteria and DataSourceAdapterBase.FilterString properties are dependent. If you update one property, the other changes as well.

Use CriteriaOperator descendants to specify the FilterCriteria property. Refer to Criteria Operators for more information.

using DevExpress.Data.Filtering;
//...
  DataSourceAdapter dataAdapter = new DataSourceAdapter();
  //...
  // Specify other data adapter settings (data source and data members) here.
  //...
  dataAdapter.FilterCriteria = new BinaryOperator("CategoryID", 1, BinaryOperatorType.Equal) |
              new BinaryOperator("CategoryID", 3, BinaryOperatorType.Equal) |
              new BinaryOperator("CategoryID", 7, BinaryOperatorType.Equal);

  series.DataAdapter = dataAdapter;
See Also