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.