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
Declaration
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:
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);