dashboard-devexpress-dot-dashboardweb-dot-aspxdashboard-d29541a1.md
Gets or sets whether to executes SQL queries on the server side.
Namespace : DevExpress.DashboardWeb
Assembly : DevExpress.Dashboard.v25.2.Web.WebForms.dll
NuGet Package : DevExpress.Web.Dashboard
[DefaultValue(false)]
public bool AllowExecutingCustomSql { get; set; }
<DefaultValue(False)>
Public Property AllowExecutingCustomSql As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true , to allow executing SQL queries on the server side; otherwise, false.
|
Execution of 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 snippet (auto-collected from DevExpress Examples) contains a reference 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.
web-forms-dashboard-customize-before-displaying-browser/CS/WebApplication7/Default.aspx.cs#L10
protected void Page_Load(object sender, EventArgs e) {
ASPxDashboard1.AllowExecutingCustomSql = true;
ASPxDashboard1.SetDashboardStorage(new DashboardFileStorage("~/App_Data/Dashboards"));
web-forms-dashboard-customize-before-displaying-browser/VB/WebApplication7/Default.aspx.vb#L13
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
ASPxDashboard1.AllowExecutingCustomSql = True
ASPxDashboard1.SetDashboardStorage(New DashboardFileStorage("~/App_Data/Dashboards"))
See Also