A dashboard provides the capability to save a dashboard definition (dashboard items, data source, data binding and layout settings, etc.) to an XML file or to a stream, and restore the dashboard from an XML file or a stream.
Once a dashboard is designed, you can save its definition to the required data store. In the Dashboard Designer, this can be accomplished in the following ways.
You can save the dashboard definition by clicking the Save or Save As button in the File group on the Designer ribbon tab.
This invokes the Save As dialog, which allows you to locate the folder in which you wish to store your file.
You can handle the DashboardDesigner.DashboardSaving event to implement a custom saving procedure when an end-user clicks one of these buttons, or tries to save the dashboard using a save confirmation dialog.
Use the Dashboard.SaveToXml method to save the dashboard to an XML file or a stream.
The dashboard definition can be saved when the currently opened dashboard is closed (for instance, the window containing the DashboardDesigner is closed, a new dashboard is created or a different dashboard is opened). By default, a save confirmation dialog will be invoked.
Use the following methods and properties to manage dialog behavior.
Gets or sets the required action when the currently opened dashboard is being closed.
Handles the dashboard close process.
The DashboardDesigner.IsDashboardModified property indicates whether or not the dashboard has been modified since the last save.
You can handle the DashboardDesigner.DashboardClosing event to define the modification state of the dashboard according to your needs.
A dashboard definition previously saved to an XML file or a stream can be loaded to the Dashboard Designer.
You can open the dashboard definition by clicking the Open button in the Ribbon menu of the Designer.
This invokes the Open File dialog, which allows you to locate the dashboard XML file.
You can handle the DashboardDesigner.DashboardOpening event to override the default Open File dialog and implement custom actions.
To load a dashboard definition using the Dashboard Viewer, use the following members.
Windows Forms Viewer
Loads a dashboard from a stream.
Gets or sets a dashboard supplier for the DashboardViewer.
Gets or sets a dashboard supplier for the ASPxDashboardViewer.
Allows you to load a dashboard at runtime.
To learn more, see the following topics.