Skip to main content
A newer version of this page is available. .

How to Customize the Data Source Wizard

  • 3 minutes to read

The Data Source Wizard allows you to establish a connection and select data from various sources. You can use the DashboardDesigner.DataSourceWizard property to customize this wizard to skip certain pages, specify the list of available data providers, and so on.

The Data Source Wizard consists of the following pages:

Database

  • The following page allows users to select connections specified in the application configuration file:

    DataSourceWizard_NewOrExistingConnection

    The Data Source Wizard does not show this page by default. To display this page, set the DashboardDesignerDataSourceWizardSettings.ShowConnectionsFromAppConfig property to true.

    Important

    Note that you can disable the creation of new connections in the Data Source Wizard. For this, use the SqlWizardSettings.DisableNewConnections property. In this case, users can only select the data connection specified in the application configuration file.

  • If a user selected No, I’d like to specify the connection parameters myself option on the previous page, the following page is shown:

    DataSourceWizard_AvailableDataProviders

    This page allows users to select the SQL data provider and specify connection parameters. Use the SqlWizardSettings.AvailableDataProviders property to customize the list of available data providers.

  • The next page allows users to decide whether user credentials are saved in a dashboard definition.

    DataSourceWizard_SaveConnectionString

    The SqlWizardSettings.DatabaseCredentialsSavingBehavior property allows you to save user credentials.

  • The final page of the Data Source Wizard allows users to invoke the Query Builder and select data.

    MSSQL_CreateQuery_WithoutStoredProcedures

    Note that the Data Source Wizard and Query Builder do not allow users to specify SQL queries. To enable this feature, set the SqlWizardSettings.EnableCustomSql property to true.

    Warning

    The use of custom SQL queries can lead to inadvertent or unauthorized modifications to your data/database structure. Ensure that you follow best practices and implement the appropriate user read/write privileges at the database level.

Entity Framework

  • For the Entity Framework data source, the invoked page allows users to select data context.

    ChooseDataContextPage

    If necessary, you can allow users to choose a custom assembly that contains a data context. To do this, enable the EFWizardSettings.ShowBrowseButton flag to add the Browse button to this page. Then, handle the EFDataSource.BeforeLoadCustomAssemblyGlobal event to manage custom assembly loading.

See Also