Back to Devexpress

DashboardConfigurator.AllowExecutingCustomSql Property

dashboard-devexpress-dot-dashboardweb-dot-dashboardconfigurator-d4c6d68b.md

latest3.6 KB
Original Source

DashboardConfigurator.AllowExecutingCustomSql Property

Gets or sets whether to execute SQL queries on the server side.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.dll

NuGet Package : DevExpress.Web.Dashboard.Common

Declaration

csharp
public bool AllowExecutingCustomSql { get; set; }
vb
Public Property AllowExecutingCustomSql As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true , to allow executing SQL queries on the server side; otherwise, false.

|

Remarks

Executing custom SQL queries is forbidden by default. If you allow executing custom SQL queries, you can use the EnableCustomSql property to enable a user to specify a custom SQL string in the Data Source wizard.

Warning

The use of custom SQL queries can lead to inadvertent or unauthorized modifications to your data/database structure. Ensure that you follow best practices and implement the appropriate user read/write privileges at database level.

See Custom SQL Queries for more information.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowExecutingCustomSql property.

Note

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.

asp-net-core-dashboard-pass-hidden-parameters-to-custom-sql-query/CS/AspNetCoreDashboard_CustomParameters/Code/DashboardUtils.cs#L24

csharp
configurator.AllowExecutingCustomSql = true;

mvc-dashboard-customize-before-displaying-browser/CS/MVCxDashboard/App_Start/DashboardConfig.cs#L14

csharp
DashboardConfigurator.Default.AllowExecutingCustomSql = true;
DashboardConfigurator.Default.SetDashboardStorage(new MyDashboardFileStorage(@"~/App_Data/Dashboards/"));

See Also

Custom SQL Queries

DashboardConfigurator Class

DashboardConfigurator Members

DevExpress.DashboardWeb Namespace