Skip to main content
All docs
V24.1

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.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[NonTestableProperty]
[TypeConverter(typeof(FilterCriteriaTypeConverter))]
[XtraChartsLocalizableCategory(XtraChartsCategory.Data)]
[XtraSerializableProperty(XtraSerializationVisibility.Hidden)]
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