Skip to main content

Load a Dashboard in ASP.NET Web Forms

  • 2 minutes to read

Load a Dashboard on the Server

Load a Single Dashboard

You can load a single dashboard to your Web Dashboard application.

Gets or sets the path to the XML definition of a dashboard to be loaded to ASPxDashboard.
Loads a dashboard from a string containing a dashboard XML definition.
Gets or sets a dashboard created at design time within Visual Studio. This property is in effect only when ASPxDashboard acts as Viewer.

However, users cannot save changes in a dashboard and create new dashboards if you use this approach. To allow users to do this, create dashboard storage.

Load a Dashboard from Dashboard Storage

Dashboard storage is a location of dashboards you use in your Web Dashboard application. Users can save new dashboards to this storage and open existing dashboards. You can use the following API to manage dashboards in dashboard storage:

Gets or sets the path to a folder used to keep dashboards.
Gets or sets whether the default dashboard should be loaded from the dashboard storage.
Gets or sets the identifier of the dashboard to be loaded to ASPxDashboard.

The DashboardInMemoryStorage and DashboardFileStorage classes implement the IDashboardStorage interface. Cast a corresponding object to IDashboardStorage and use IDashboardStorage.GetAvailableDashboardsInfo to obtain available dashboard identifiers.

You can also use the following events to modify dashboards in dashboard storage:

Load a Dashboard on the Client

Use this method to load a dashboard with the specified identifier from the dashboard storage.
Call this method to close the displayed dashboard.
Use this property to specify the identifier of the dashboard to be loaded to the DashboardControl before the control is rendered.

The following code snippet demonstrates how to load a dashboard with the dashboard1 identifier on the client:

    .done(function () { alert("A dashboard is loaded successfully."); })
    .fail(function() { alert("Cannot load a dashboard."); });