Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V21.2
  • SnapDocument.CustomFilterExpression Event

    Allows you to include WHERE clauses in SQL queries.

    Namespace: DevExpress.Snap.Core.API

    Assembly: DevExpress.Snap.v21.2.Core.dll

    NuGet Package: DevExpress.Snap.Core

    Declaration

    event CustomFilterExpressionEventHandler CustomFilterExpression

    Event Data

    The CustomFilterExpression event's data class is CustomFilterExpressionEventArgs. The following properties provide information specific to this event:

    Property Description
    DataSourceComponentName Get the data source name, used in code to identify the data source’s object, for which the event has been raised.
    DataSourceConnectionName
    DataSourceName Gets the name of the data source for which the event has been raised.
    FilterExpression Gets or sets the filter expression that defines a WHERE clause included in the SQL query.
    QueryName Gets the name of the query for which the event was raised.

    Remarks

    The CustomFilterExpression event is fired when the SnapDocument sends a query to reload data from the server. Use the event parameter’s CustomFilterExpressionEventArgs.FilterExpression property to specify a filter expression to be included into this query as a WHERE clause.

    The filter expression should be represented by the CriteriaOperator descendant. To learn how to create the appropriate object, see Creating Criteria.

    Use the CustomFilterExpressionEventArgs.DataSourceName property to identify the data source for which the event has been raised.

    Note

    The CustomFilterExpression event is fired only for data sources which are not populated with a custom SQL query.

    You can also handle the SnapDocument.ConfigureDataConnection event to specify connection parameters on the fly.

    See Also