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

ExtractDataSourceUIHelper Class

Allows you to invoke the Data Source Wizard for the ExtractDataSource type.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v20.1.Win.dll

NuGet Packages: DevExpress.Win.Dashboard, DevExpress.WindowsDesktop.Win.Dashboard

Declaration

public static class ExtractDataSourceUIHelper

Example

This example demonstrates how to customize the Data Source Wizard pages and invoke a customized Wizard in the DashboardViewer.

The static EditExtractOptions(DashboardExtractDataSource, EditExtractOptionsContext) method invokes the Data Source Wizard. To customize the Edit extract page, the application uses the approach described in the How to Customize Views and Presenters Corresponding to Wizard Pages document.

EditExtractOptionsContext optionsContext = new EditExtractOptionsContext(this.GetActiveLookAndFeel(), this, dashboardViewer1.Dashboard.DataSources);
optionsContext.WizardCustomization = new CustomExtractDataSourceWizardCustomizationService();
ExtractDataSourceUIHelper.EditExtractOptions(new DashboardExtractDataSource() { FileName = "test.dat" }, optionsContext);   

It implements the IExtractDataSourceWizardCustomization interface in a CustomExtractDataSourceWizardCustomizationService class to register a customized page view:

public class CustomExtractDataSourceWizardCustomizationService : IExtractDataSourceWizardCustomization
{
    public void CustomizeDataSourceWizard(IWizardCustomization<ExtractDataSourceModel> customization)
    {
        customization.RegisterPageView<ICreateExtractDataSourcePageView, CustomConfigureExtractDataSourcePageView>();
    }
}

A customized page view is the CustomConfigureExtractDataSourcePageView class that inherits the CreateExtractDataSourcePageView type:

public class CustomConfigureExtractDataSourcePageView : CreateExtractDataSourcePageView
{
    public CustomConfigureExtractDataSourcePageView() : base()
    {                     
        this.checkEditExistingDataSource.Enabled = false;

    }

    protected override void OnCheckEditExistingDataSourceCheckedChanged(object sender, EventArgs e)
    {
        base.OnCheckEditExistingDataSourceCheckedChanged(sender, e);
        TextEditFileName.Enabled = false;
    }
}

Inheritance

Object
ExtractDataSourceUIHelper
See Also