Skip to main content
A newer version of this page is available. .
All docs
V21.2

ISelectQueryFilterService.CustomizeFilterExpression(SelectQuery, CriteriaOperator) Method

Allows you to add a conditional clause to each SELECT query before the SqlDataSource executes it.

Namespace: DevExpress.DataAccess.Web

Assembly: DevExpress.DataAccess.v21.2.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.Design

Declaration

CriteriaOperator CustomizeFilterExpression(
    SelectQuery query,
    CriteriaOperator filterExpression
)

Parameters

Name Type Description
query SelectQuery

A SELECT query.

filterExpression CriteriaOperator

A filter already applied to the SELECT query.

Returns

Type Description
CriteriaOperator

A filter that should be applied to the SELECT query.

Remarks

The CustomizeFilterExpression method allows you to add a conditional clause to each SELECT query before execution. You can change the query filter, but you cannot modify the original query passed as the method’s parameter.

For a code example, refer to the following help topic: Multi-Tenant Support (Row Filtering in Shared SQL Database).

See Also