Skip to main content

SqlDataSource.DisableCustomQueryValidation Property

Gets or sets whether the validation of custom SQL queries is performed.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public static bool DisableCustomQueryValidation { get; set; }

Property Value

Type Description

true, to disable the validation of custom SQL queries; otherwise, false.

The default is false.


If the DisableCustomQueryValidation property is set to false, the SqlDataSource will be filled using only custom SQL queries that contain only SELECT statements. If the validation was not successful, the CustomSqlQueryValidationException will be thrown.

To skip query validation, set the DisableCustomQueryValidation property to true.

To access custom SQL queries (CustomSqlQuery) for the specified SqlDataSource, use the SqlDataSource.Queries property.


If necessary, you can manage the validation of custom SQL queries by handling the SqlDataSource.ValidateCustomSqlQuery and SqlDataSource.ValidateCustomSqlQueryGlobal events.

See Also