Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SqlWizardSettings Class

Contains settings used to customize the Data Source wizard and Query Builder.

Namespace: DevExpress.DataAccess.UI.Wizard

Assembly: DevExpress.DataAccess.v24.2.dll

NuGet Package: DevExpress.DataAccess

#Declaration

public class SqlWizardSettings

The following members return SqlWizardSettings objects:

Library Related API Members
WinForms Controls DataSourceWizardSettings.SqlWizardSettings
Dashboard DashboardDesignerDataSourceWizardSettings.SqlWizardSettings
.NET Reporting Tools XRDesignMdiController.SqlWizardSettings

#Remarks

The capability to access and set properties of the SqlWizardSettings class depends on which object you use in your application to invoke the Data Wizard. Commonly used objects are described below.

#Report Designer Component

When you drop the RibbonReportDesigner component (or the StandardReportDesigner component) onto a form, the End-User Report Designer with a ribbon or standard UI is created.

Use the Properties window to specify SQL Wizard settings:

Sql Wizard Settings Property Grid Visual Studio Report Designer

#Default End-User Report Designer Form

The following code snippet shows how to specify SQL Wizard settings when you invoke the End-User Report Designer using the ReportDesignTool class methods:

using DevExpress.XtraReports.UI;
// ...
  ReportDesignTool designer = new ReportDesignTool(new XtraReport());
  designer.DesignRibbonForm.DesignMdiController.DataSourceWizardSettings.
      SqlWizardSettings.DisableNewConnections = true;
  designer.ShowRibbonDesigner();

#SqlDataSourceUIHelper Class

The following code snippet shows how to specify SQL Wizard settings when you invoke the Data Source Wizard pages using the SqlDataSourceUIHelper class methods:

using DevExpress.DataAccess.Sql;
using DevExpress.DataAccess.UI.Sql;
using DevExpress.DataAccess.UI.Wizard;
// ...
var sqlDataSource = new SqlDataSource();
var context = new ConfigureConnectionContext();

SqlWizardSettings settings = new SqlWizardSettings() {
    DisableNewConnections = true,
    EnableCustomSql = true};

context.Options = settings.ToSqlWizardOptions();
context.DatabaseCredentialsSavingBehavior = DevExpress.DataAccess.Wizard.SensitiveInfoSavingBehavior.Never;
SqlDataSourceUIHelper.ConfigureConnection(sqlDataSource, context);

#Inheritance

See Also