/winforms-dashboard-save-restore-dashboard-state

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

Primary LanguageC#OtherNOASSERTION

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)