The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to Customize the Data Source Wizard

  • 3 min to read

The Data Source Wizard provides the capability to establish a connection and select data from various sources. If necessary, you can customize this wizard to skip certain pages, specify the list of available data providers, etc. To do this, use the DashboardDesigner.DataSourceWizard property.

The Data Source Wizard provides the following pages:

Database

  • The following page allows end-users to select connections specified in the application configuration file.

    DataSourceWizard_NewOrExistingConnection

    By default, the Data Source Wizard does not show this page. 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 using the SqlWizardSettings.DisableNewConnections property. In this case, end-users can only select the data connection specified in the application configuration file.

  • If an end-user selected No, I'd like to specify the connection parameters myself option on the previous page it invokes the following page:

    DataSourceWizard_AvailableDataProviders

    This page allows end-users to select the required SQL data provider and specify connection parameters. You can customize the list of available data providers using the SqlWizardSettings.AvailableDataProviders property.

  • The next page allows end-users to decide whether user credentials save into a dashboard definition.

    DataSourceWizard_SaveConnectionString

    You can manage the saving of user credentials using the SqlWizardSettings.DatabaseCredentialsSavingBehavior property.

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

    MSSQL_CreateQuery_WithoutStoredProcedures

    Note that the Data Source Wizard and Query Builder do not allow end-users to specify SQL queries manually by default. To enable this capability, 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. Therefore, make sure that you follow best practices and implement the appropriate end-user read/write privileges at the database level.

Entity Framework

  • For the Entity Framework data source, the page allowing users to select the required data context is invoked.

    ChooseDataContextPage

    If necessary, you can supply users with the capability to choose a custom assembly providing a required 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