Skip to main content

DashboardViewer.SaveDashboardLayout(String) Method

Saves a dashboard layout (layout items and layout containers) to a separate XML file.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v23.2.Win.dll

NuGet Package: DevExpress.Win.Dashboard

Declaration

public void SaveDashboardLayout(
    string filePath
)

Parameters

Name Type Description
filePath String

A String that specifies the path to an XML file that contains the dashboard layout.

Remarks

Layout Concepts

Regardless of the platform, the dashboard uses layout items and layout containers to arrange dashboard items in a hierarchical structure. This structure is called a dashboard layout.

Element Description API (Desktop / Web)
Layout item Contains and displays an individual dashboard item. DashboardLayoutItem
DashboardLayoutItem
Layout group A container that is used to arrange layout items (or other layout groups) either horizontally or vertically. At the same time, layout groups are containers that display dashboard item groups. You cannot add a dashboard item group to another group. DashboardLayoutGroup
DashboardLayoutGroup
Layout tab page A container for layout items and groups. The tab page can include dashboard items and groups, but cannot include tab pages and tab containers. Nested tabs are not allowed. DashboardLayoutTabPage
DashboardLayoutTabPage
Layout tab container A container for layout tab pages. DashboardLayoutTabContainer
DashboardLayoutTabContainer

Refer to Dashboard Layout for additional information about layout concepts.

Note that if SaveDashboardLayout(String) is used to save the layout and you change the name of a dashboard item or the number of items in the DashboardDesigner, the layout is rendered incorrectly when you use LoadDashboardLayout(String) to restore it.

The SaveDashboardLayout / DashboardViewer.LoadDashboardLayout do not save a dashboard state. Use the DashboardViewer.GetDashboardState and DashboardViewer.SetDashboardState methods to obtain and apply the dashboard state, respectively. The DashboardViewer.SetInitialDashboardState event restores the saved dashboard state.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveDashboardLayout(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also