Skip to content

This example demonstrates how to manage dashboard state to save and restore user selections.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-dashboard-save-restore-dashboard-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for WinForms - How to Save and Restore the Dashboard State

This example demonstrates how to manage dashboard state to save and restore user selections.

screenshot

When the form closes, the DashboardViewer.GetDashboardState obtains a dashboard state object. It is serialized to XML and added to the XElement object stored in the CustomProperties collection. Subsequently the dashboard with the dashboard state data is saved to a file.

When the application starts, the DashboardViewer control loads the dashboard and the DashboardState object is deserialized in the GetStateFromCustomProperty method.

The dashboard state is restored using the GetStateFromCustomProperty method in the DashboardViewer.SetInitialDashboardState event handler.

You can click the Reset Dashboard State button to apply the dashboard state created at runtime.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)