Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Collapse]Snap
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamental Concepts
   [Collapse]Examples
     How to: Bind a Report to an MDB Database (Runtime Sample)
     How to: Bind a Report to Multiple MDB Data Sources (Runtime Sample)
     How to: Bind a Report to a Dataset Populated from an XML File (Runtime Sample)
     How to: Bind a Report to Multiple List Data Sources (Runtime Sample)
     How to: Bind a Report to an MS SQL Server Database
     How to: Calculate a Summary Function
     How to: Create a Calculated Field
     How to: Limit the Data Supplied During Document Editing
     How to: Create a Snap Template (Runtime Sample)
     How to: Sort Data (Runtime Sample)
     How to: Group Data (Runtime Sample)
     How to: Filter Data (Runtime Sample)
     How to: Format Data
     How to: Pass Parameters to a Report
     How to: Pass Parameters to a Report (Runtime Sample)
     How to: Create a Master-Detail Report
     How to: Create a Multi-Column Report
     How to: Create a Side-by-Side Report
     How to: Create a Report with a Chart
     How to: Save, Load, or Export a Report
     How to: Add a Table of Contents to a Report
     How to: Customize the Data Source Wizard
     How to: Programmatically Mark the Data Source as Use for Mail Merge
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Customize the Data Source Wizard

This example demonstrates how to implement the IDataSourceWizardCustomizationService interface to skip the default Data Source Wizard page, which is used to select the existing connection to an SQL database and move directly to the custom wizard page that enables end-users to create a new connection to one of the following data sources: Microsoft SQL Server database, Microsoft Access 97 database, or Microsoft Access 2003 database.

Tip

There is no need to implement the IDataSourceWizardCustomizationService interface if you just wish to change the list of available data source types displayed on the "Select the data source type" wizard page. To do this, use the DataSourceWizardOptions.DataSourceTypes property of the DataSourceWizardOptions object accessible from the SnapControlOptions.DataSourceWizardOptions property.

Expanded Create Custom Pages

To customize the default Data Source Wizard pages, derive from the standard class representing the wizard page you wish to modify, and override its GetNextPageType method to define the order in which the pages will appear in the wizard.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T307510.

The full list of the Data Source Wizard pages is available in the DevExpress.DataAccess.Wizard.Presenters namespace.

Expanded Create a Wizard Customization Service

To add custom pages to the wizard, do the following.

  1. Create a service that implements the IDataSourceWizardCustomizationService interface.

  2. Implement the IDataSourceWizardCustomizationService.CustomizeDataSourceWizard method, which accepts one parameter - an object exposing the IWizardCustomization<DataSourceModel> interface. This object provides a set of methods required for the wizard customization.

    • The StartPage method allows you to set the first page for the Data Source Wizard.

    • The RegisterPage method is used to add a custom or modified page to the wizard.

    • The Resolve method returns wizard items by their type, so that you can change them as required.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T307510.

Expanded Register a Wizard Customization Service

To launch the customized Data Source Wizard instead of the default one, add the specified customization service to the service container by using the AddService method of SnapControl.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T307510.

How would you rate this topic?​​​​​​​