Loading a Dashboard

The ASPxDashboard control provides a set of mutually exclusive approaches for loading a dashboard. These approaches can be divided into two groups.

Loading a single dashboard

API

Description

ASPxDashboard.DashboardXmlPath

Use this property to load the dashboard from the XML file.

ASPxDashboard.OpenDashboard

Use this method to load the dashboard from an XDocument or a string with the XML definition.

ASPxDashboard.DashboardType

Use this property to open the dashboard created at design time within Visual Studio.

Note

This property is in effect only when ASPxDashboard acts as the Viewer.

Note that if you load the dashboard using ASPxDashboard.DashboardXmlPath or ASPxDashboard.OpenDashboard, end-users will not be able to create new dashboards. To allow end-users to do this, consider creating a dashboard storage.

Loading a dashboard from the dashboard storage

API

Description

ASPxDashboard.LoadDefaultDashboard

Use this property to specify whether or not the default dashboard should be loaded from the dashboard storage.

ASPxDashboard.DashboardStorageFolder

Use this property to specify the path to a folder used to keep dashboard XML definitions. To load a specified dashboard, assign the name of the corresponding XML file (without an extension) to the ASPxDashboard.DashboardId property.

ASPxDashboard.SetDashboardStorage

Use this property to specify a custom storage of dashboards. To load a specified dashboard, assign its identifier to the ASPxDashboard.InitialDashboardId property.

Note

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

If necessary, you can provide a dashboard XML definition at runtime. For this, initialize the ASPxDashboard.InitialDashboardId property and handle the ASPxDashboard.DashboardLoading event.