Back to Devexpress

DataSourceAdapterBase.FilterString Property

corelibraries-devexpress-dot-xtracharts-dot-datasourceadapterbase-91f55611.md

latest2.8 KB
Original Source

DataSourceAdapterBase.FilterString Property

Gets or sets the filter string that is applied to the series to filter displayed data.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[Browsable(false)]
[DefaultValue("")]
[XtraChartsLocalizableCategory(XtraChartsCategory.Data)]
public string FilterString { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Data)>
<DefaultValue("")>
<Browsable(False)>
Public Property FilterString As String

Property Value

TypeDefaultDescription
StringString.Empty

The filter string.

|

Remarks

Use the FilterString 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 FilterString property to a new value, applied filters are reset.

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

Use Criteria Language Syntax to create a filter expression. Then, assign the expression to the FilterString property:

csharp
using DevExpress.Data.Filtering;
//...
  DataSourceAdapter dataAdapter = new DataSourceAdapter();
  //...
  // Specify other data adapter settings (data source and data members) here.
  //...
  dataAdapter.FilterString = "CategoryID = 1 Or CategoryID = 3 Or CategoryID = 7";

  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.FilterString = "CategoryID = 1 Or CategoryID = 3 Or CategoryID = 7"

    series.DataAdapter = dataAdapter

See Also

DataSourceAdapterBase Class

DataSourceAdapterBase Members

DevExpress.XtraCharts Namespace