Back to Devexpress

SqlWizardSettings Class

windowsforms-devexpress-dot-dataaccess-dot-ui-dot-wizard-c9c23d27.md

latest4.7 KB
Original Source

SqlWizardSettings Class

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

Namespace : DevExpress.DataAccess.UI.Wizard

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
public class SqlWizardSettings
vb
Public Class SqlWizardSettings

The following members return SqlWizardSettings objects:

LibraryRelated API Members
WinForms ControlsDataSourceWizardSettings.SqlWizardSettings
DashboardDashboardDesignerDataSourceWizardSettings.SqlWizardSettings
.NET Reporting ToolsXRDesignMdiController.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:

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:

csharp
using DevExpress.XtraReports.UI;
// ...
  ReportDesignTool designer = new ReportDesignTool(new XtraReport());
  designer.DesignRibbonForm.DesignMdiController.DataSourceWizardSettings.
      SqlWizardSettings.DisableNewConnections = true;
  designer.ShowRibbonDesigner();
vb
Imports DevExpress.XtraReports.UI
' ...
Dim designer As 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:

csharp
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);
vb
Option Infer On

Imports DevExpress.DataAccess.Sql
Imports DevExpress.DataAccess.UI.Sql
Imports DevExpress.DataAccess.UI.Wizard
' ...
Private sqlDataSource = New SqlDataSource()
Private context = New ConfigureConnectionContext()

Private settings As New SqlWizardSettings() With {
  .DisableNewConnections = True,
  .EnableCustomSql = True
}

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

Inheritance

Object SqlWizardSettings DashboardDataSourceWizardSettings

See Also

SqlWizardSettings Members

DevExpress.DataAccess.UI.Wizard Namespace