Back to Devexpress

DataSourceAdapterBase.FilterCriteria Property

corelibraries-devexpress-dot-xtracharts-dot-datasourceadapterbase-8aec4d1c.md

latest3.2 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Data)]
public CriteriaOperator FilterCriteria { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Data)>
Public Property FilterCriteria As CriteriaOperator

Property Value

TypeDescription
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.

csharp
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;
vb
Imports DevExpress.Data.Filtering
'...
    Dim dataAdapter As DataSourceAdapter = New DataSourceAdapter()
    '...
    ' Specify other data adapter settings (data source and data members) here.
    '...
    dataAdapter.FilterCriteria = New BinaryOperator("CategoryID", 1, BinaryOperatorType.Equal) Or 
                                 New BinaryOperator("CategoryID", 3, BinaryOperatorType.Equal) Or 
                                 New BinaryOperator("CategoryID", 7, BinaryOperatorType.Equal)

    series.DataAdapter = dataAdapter

See Also

Filter Series Data

DataSourceAdapterBase Class

DataSourceAdapterBase Members

DevExpress.XtraCharts Namespace