Skip to main content

ASPxDashboard.OpenDashboard(XDocument) Method

Loads a dashboard from a document containing a dashboard XML definition.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v24.1.Web.WebForms.dll

NuGet Package: DevExpress.Web.Dashboard

Declaration

public void OpenDashboard(
    XDocument document
)

Parameters

Name Type Description
document XDocument

A XDocument object that is a document containing a dashboard XML definition.

Remarks

Note that the OpenDashboard method can be used only on the initial page loading (in the Page_Load event handler). To learn more about different methods of loading a dashboard, see Loading a Dashboard.

Note

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

Example

The following code snippet show how to load a dashboard stored in the MyDashboard class to the ASPxDashboard control using the ASPxDashboard.OpenDashboard method.

using DevExpress.DashboardCommon;
// ...

protected void Page_Load(object sender, EventArgs e) {
    MyDashboard dashboard = new MyDashboard();
    ASPxDashboard1.OpenDashboard(dashboard.SaveToXDocument());
}
// ...
See Also