All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Extract Data Source

  • 2 minutes to read

This tutorial shows how to add the DashboardExtractDataSource to data source storage and make it available to users.

  1. In your application, add the SalesOverview.dat file to the App_Data folder from the C:\Users\Public\Documents\DevExpress Demos 20.2\Components\Data directory.

  2. In the Default.aspx.cs (or .vb) file, create a public method that returns the configured dashboard's data source storage (DataSourceInMemoryStorage) and define the Extract data source.

    using DevExpress.DashboardCommon;
    using System.Web.Hosting;
    
    public DataSourceInMemoryStorage CreateDataSourceStorage() {
        DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();
    
        DashboardExtractDataSource extractDataSource = new DashboardExtractDataSource("Extract Data Source");
        extractDataSource.Name = "Extract Data Source";
        extractDataSource.FileName = HostingEnvironment.MapPath(@"~/App_Data/SalesPersonExtract.dat");
        dataSourceStorage.RegisterDataSource("extractDataSource ", extractDataSource.SaveToXml());
    
        return dataSourceStorage;
    }
    
  3. Call the ASPxDashboard.SetDataSourceStorage method to configure the data source storage. Use the created CreateDataSourceStorage method as the SetDataSourceStorage parameter.

    using DevExpress.DashboardWeb;
    
    protected void Page_Load(object sender, EventArgs e) {
        // ...  
    
        // Configures the data source storage.
        ASPxDashboard1.SetDataSourceStorage(CreateDataSourceStorage());
    }
    

The Extract Data Source is now available in the Web Dashboard:

web-dashboard-ex-extract-data-source

Users can now bind dashboard items to data in the Web Dashboard's UI.

Example

The example shows how to make a set of data sources available for users in the Web Dashboard application.

View Example: How to Register Data Sources for ASP.NET Web Forms Dashboard Control