Update: starting with version 15.2, it is possible to disable creating new connections by setting the DashboardDesigner.DataSourceWizardSettings.DisableNewConnections property to True.
This example demonstrates how to use the DashboardDesigner.DataSourceWizardCustomization to replace the default pages of the data source wizard with custom ones:
[C#]dashboardDesigner1.DataSourceWizardCustomization=newDataSourceWizardCustomization();
We use following code to skip first page which allows selecting the data source type, and specify custom a wizard page that allows selecting one of the predefined connections. This custom page does not allow establishing a new connection:
[C#]publicclassDataSourceWizardCustomization:IDashboardDataSourceWizardCustomization{publicvoidCustomizeDataSourceWizard(IWizardCustomization<DashboardDataSourceModel>customization){customization.StartPage=typeof(ChooseConnectionPage<DashboardDataSourceModel>);customization.Model.DataSourceType=DashboardDataSourceType.Xpo;customization.RegisterPageView<IChooseConnectionPageView,CustomChooseConnectionPageView>();}}
To specify default connections in code behind, use the DashboardDesigner.CustomDataConnections Property.
See Also:
How to define a custom IConnectionStorageService in DashboardDesigner to filter out unnecessary connections from an app.config file
Question Comments
Added By: mori khazaei 1 at: 7/29/2015 9:23:35 PM
Hi,
I run this example. first no references is known and I add all again and then this error appear when I compile it:
'WizardCustomizationExample1.DataSourceWizardCustomization' does not implement interface member 'DevExpress.DashboardWin.ServiceModel.IDashboardDataSourceWizardCustomization.CustomizeDataSourceWizzard(DevExpress.DataAccess.UI.Wizard.IWizardCustomization<DevExpress.DashboardCommon.DashboardDataSourceModel>)'
The error is from DataSourceWizardCustomization1.cs line 49 column 18
how can I resolve this error?
Added By: Constant (DevExpress Support) at: 7/30/2015 12:39:46 AMThe problem likely appears because you use the Dashboard Suite version, which does not support this functionality. This interface and other required members were introduced only in version 15.1.5. If you use an older version, it is necessary to upgrade it to use this functionality.
Added By: Genesis Supsup 1 at: 12/12/2015 8:52:23 PMDoes this work in 15.2 or higher versions?
Added By: Constant (DevExpress Support) at: 12/14/2015 8:14:28 AMStarting with version 15.2, it is possible to disable creating new connections by setting the DashboardDesigner.DataSourceWizardSettings.DisableNewConnections property to True.
Added By: Akhil Chauhan at: 2/10/2016 1:12:23 AM Hi ,I am using EntityFramework complied dll for Datasource. Could you please have sample same as below for EF Pageview. So that I could set default dll without browse option for user.
Added By: Constant (DevExpress Support) at: 2/10/2016 5:33:26 AM
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T344122: Data Source Wizard - How to select certain EF assembly by default. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.