How to: Bind a Dashboard to a DataSet at Design Time and Provide Data at Runtime


This documentation applies to v16.2. Starting with v17.1, the ASPxDashboardViewer control is in maintenance mode. In v19.1, the new Web Dashboard Control replaces the old Web Dashboard Viewer. This means that the Web Dashboard Viewer will not be included in our installation packages. See our blog post for more information.

Refer to the following KB articles to learn how to migrate to ASPxDashboard / ASP.NET MVC Dashboard:

The following tutorial shows how to create the data source by specifying a schema using an XML/XSD file or a data class at Visual Studio design time.

  1. To create a new data source, click the Add button in the Data Sources dialog and select XML Schema.


    Click Next.

  2. On the next page, locate the XML/XSD file or specify a data class to provide a data source schema. Click Finish.


  3. The invoked Data Sources dialog will contain the created data source.


  4. Type the required DataMember manually to retrieve the data source fields...


    ... and click OK to add the created data source to the collection of dashboard data sources.

  5. Finally, to provide actual data for the created data source, create a data source object instance in code and assign it to the ObjectDataSource.DataSource property of the DashboardObjectDataSource object or handle the Dashboard.DataLoading event to provide data at runtime.

The following example demonstrates how to bind a dashboard to a DataSet at design time and fill it with data from the SalesPerson table in the Northwind database.

In this example, the dashboard is created at design time within Visual Studio and displayed in the ASPxDashboardViewer. The dataset is filled with data in the Dashboard.DataLoading event handler.

<%@ Page Language="vb" AutoEventWireup="true" 
                       Inherits="Dashboard_DataLoading.WebForm1" %>

<%@ Register Assembly="DevExpress.Dashboard.v15.1.Web, Version=, 
             Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <dx:ASPxDashboardViewer ID="ASPxDashboardViewer1" runat="server" FullscreenMode=true
See Also