Skip to main content
A newer version of this page is available.

SnapDocument.CustomFilterExpression Event

Allows you to include WHERE clauses in SQL queries.

Namespace: DevExpress.Snap.Core.API

Assembly: DevExpress.Snap.v19.1.Core.dll

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.
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.
TableName Indicates the name of a data table to which the CustomFilterExpressionEventArgs.FilterExpression applies.

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 created via the Query Designer and not populated with a custom SQL query.

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

See Also