Back to Devexpress

How to Customize Views and Presenters Corresponding to Wizard Pages

dashboard-18293-winforms-dashboard-winforms-designer-ui-elements-and-customization-dialogs-and-wizards-data-source-wizard-how-to-customize-views-and-presenters-corresponding-to-wizard-pages.md

latest9.8 KB
Original Source

How to Customize Views and Presenters Corresponding to Wizard Pages

  • Sep 24, 2025
  • 3 minutes to read

To perform deep customization of the Data Source wizard pages, you can update corresponding views and presenters (Model-View-Presenter design pattern). To learn more about common concepts of the Data Source wizard customization, see Wizard Customization API.

To customize the Data Source wizard used in the WinForms Dashboard Designer, perform the following steps:

To learn about presenters and views specific to the WinForms Designer, see the tables below.

Common Pages

Wizard PagePage PresenterPage View InterfacePage View
Select a Data ConnectionChooseConnectionPageIChooseConnectionPageViewChooseConnectionPageView
Enter the Data Source NameDashboardChooseDataSourceNamePage<TModel>IChooseDataSourceNamePageViewChooseDataSourceNamePageView
Select the Data Connection TypeDashboardChooseDataProviderPage<TModel>IChooseDataProviderPageViewDashboardChooseDataProviderPageView

OLAP

Wizard PagePage PresenterPage View InterfacePage View
Select a Data ConnectionChooseOlapConnectionPage<TModel>IChooseConnectionPageViewChooseConnectionPageView
Configure Connection ParametersConfigureOlapParametersPage<TModel>IConfigureOlapParametersPageViewConfigureOlapParametersPageView

Extract

Wizard PagePage PresenterPage View InterfacePage View
Create a Data ExtractCreateExtractDataSourcePage<TModel>ICreateExtractDataSourcePageViewCreateExtractDataSourcePageView
Select Data FieldsChooseExtractFieldsPage<TModel>IChooseExtractFieldsPageViewChooseExtractFieldsPageView
Specify Filter OptionsConfigureExtractDataSourcePage<TModel>IConfigureExtractDataSourcePageViewConfigureExtractDataSourcePageView
Specify Extract ParametersExtractParametersPage<TModel>IExtractParametersPageViewExtractParametersPageView
Save Extract to a FileStoreExtractFilePage<TModel>IStoreExtractFilePageViewStoreExtractFilePageView

Example

The following code snippets show how to remove the Connection type option from the Data Source wizard page that allows end-users to specify OLAP connection parameters. To do this, use the DashboardDesigner.DataSourceWizardCustomizationService property.

vb
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardCommon.DataSourceWizard
Imports DevExpress.DashboardWin
Imports DevExpress.DashboardWin.DataSourceWizard
Imports DevExpress.DashboardWin.Native
Imports DevExpress.DataAccess.UI.Wizard

Namespace DataSourceWizardCustomization
    Partial Public Class Form1
        Inherits DevExpress.XtraBars.Ribbon.RibbonForm

        Public Sub New()
            InitializeComponent()
            dashboardDesigner1.CreateRibbon()
            dashboardDesigner1.DataSourceWizardCustomizationService = New DataSourceWizardCustomizationService()
            dashboardDesigner1.ShowDataSourceWizard()
        End Sub
    End Class

    Public Class DataSourceWizardCustomizationService
        Implements IDataSourceWizardCustomizationService

        Public Sub CustomizeDataSourceWizard(ByVal customization As IWizardCustomization(Of DashboardDataSourceModel)) _
            Implements IDataSourceWizardCustomizationService.CustomizeDataSourceWizard
            customization.RegisterPageView(Of IConfigureOlapParametersPageView, CustomConfigureOlapParametersPageView)()
        End Sub
    End Class

    Friend Class CustomConfigureOlapParametersPageView
        Inherits ConfigureOlapParametersPageView

        Protected Overrides Function CreateOlapConnectionParametersControl() As OlapConnectionParametersControl
            Return New CustomOlapConnectionParametersControl()
        End Function
    End Class

    Friend Class CustomOlapConnectionParametersControl
        Inherits OlapConnectionParametersControl

        Public Sub New()
            MyBase.New()
            lciConnectionType.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never
        End Sub
    End Class
End Namespace
csharp
using DevExpress.DashboardCommon;
using DevExpress.DashboardCommon.DataSourceWizard;
using DevExpress.DashboardWin;
using DevExpress.DashboardWin.DataSourceWizard;
using DevExpress.DashboardWin.Native;
using DevExpress.DataAccess.UI.Wizard;

namespace DataSourceWizardCustomization {
    public partial class Form1 : DevExpress.XtraBars.Ribbon.RibbonForm {
        public Form1() {
            InitializeComponent();
            dashboardDesigner1.CreateRibbon();
            dashboardDesigner1.DataSourceWizardCustomizationService = new DataSourceWizardCustomizationService();
            dashboardDesigner1.ShowDataSourceWizard();
        }
    }

    public class DataSourceWizardCustomizationService : IDataSourceWizardCustomizationService {
        public void CustomizeDataSourceWizard(IWizardCustomization<DashboardDataSourceModel> customization) {
            customization.RegisterPageView<IConfigureOlapParametersPageView, CustomConfigureOlapParametersPageView>();
        }
    }

    class CustomConfigureOlapParametersPageView : ConfigureOlapParametersPageView {
        protected override OlapConnectionParametersControl CreateOlapConnectionParametersControl() {
            return new CustomOlapConnectionParametersControl();
        }
    }

    class CustomOlapConnectionParametersControl : OlapConnectionParametersControl {
        public CustomOlapConnectionParametersControl() : base() {
            lciConnectionType.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
        }
    }
}

See Also

How to Customize the Data Source Wizard