Runtime Customization
- 2 minutes to read
This document describes structural elements of a Data Source Wizard, which is used to provide data to controls.
The document consists of the following sections.
Wizard’s Structural Elements
The Data Source Wizard is used to bind a control to a data source. It is used by the SqlDataSource and ExcelDataSource components, as well as by DevExpress Reporting, Dashboard, and Snap.
The Report wizard’s architecture is based on the MVP (Model-View-Presenter) design pattern. Every wizard page is defined by a presenter and view.
Model stores settings defined on wizard pages. A wizard model must implement the IWizardModel interface, for example:
When adding custom fields to this model, make sure that they implement the Equals method.
- Views define the Graphical User Interface of wizard pages. Each page view is an XtraUserControl descendant populated with data editors allowing an end-user to specify particular settings. Each page view should descend from the WizardViewBase class, which implements the IWizardPageView interface.
Presenters define the logic behind a specific wizard page. Each presenter defines how a page is initialized, how user-specified data is processed in the context of the current page, as well as how settings specified by an end-user are submitted to the report model.
Each page presenter should descend from the abstract WizardPageBase<TView, TModel> class, which implements the IWizardPage<TWizardModel> interface. The TView type parameter of this class allows you to associate a page presenter with an appropriate view.
For a list of default page views and presenters used in the Data Source wizard, see Page Views and Presenters.
Wizard’s Customization API
To define wizard customization logic, implement the following interfaces.
- IWizardCustomizationService (to customize the Report Wizard)
- IDataSourceWizardCustomizationService (to customize the Dashboard Data Source Wizard)