Skip to main content

SelectNode.FilterString Property

Specifies the criteria used to filter data returned by the node.

Namespace: DevExpress.DataAccess.DataFederation

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public string FilterString { get; set; }

Property Value

Type Default Description
String null

A string that is the filter criteria.


The FilterString property allows you to apply a filter to the data returned by the SelectNode.

The following example filters the Orders table by the Seafood category. The CategoryName value is defined as a parameter cat - the ? sign precedes the parameter name. The parameter value is specified in the FederationDataSource.Fill(String[]) method call.


This code snippet demonstrates how to create a federated data source that uses a filter with a parameter.


The complete sample project How to Create a Federated Data Source at Runtime is available in the DevExpress Examples repository.

using DevExpress.DataAccess.DataFederation;
// ...
    FederationDataSource federation = new FederationDataSource();

    Source source = new Source("excelSource", CreateExcelDataSource("SalesPerson.xlsx", "Data"));

    var sourceNode = new SourceNode(source, "Orders");

    var query = new SelectNode(sourceNode)
        Alias = "excel",
        Expressions = {
                new SelectColumnExpression(sourceNode, "OrderID"),
                new SelectColumnExpression(sourceNode, "OrderDate"),
                new SelectColumnExpression(sourceNode, "Sales Person"),
                new SelectColumnExpression(sourceNode, "ProductName"),
                new SelectColumnExpression(sourceNode, "Extended Price")
        FilterString = "[Orders.CategoryName] = ?cat",
    federation.Fill(new[] { 
        new DevExpress.DataAccess.Sql.QueryParameter("cat", typeof(string), "Seafood") });

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FilterString property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also