Skip to content

This example shows how to manage the dashboard state to save and restore selected master filter values, current drill-down levels and other selections such as the selected Choropleth Map's layer.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-viewer-save-and-apply-dashboard-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for WinForms - How to Set the Initial Dashboard State in the Viewer

This example shows how to manage the dashboard state to save and restore selected master filter values, current drill-down levels and other selections such as the selected Choropleth Map's layer.

The saved dashboard state contains the following settings:

  • The ChoroplethMap's LayerIndex is set to 1.
  • The ChoroplethMap's Master-Filter value is set to Wyoming.
  • The Grid's Drill-Down value is set to Bikes.

When the dashboard is closed, the DashboardViewer.GetDashboardState method 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 the dashboard xml file.

When the application starts, the DashboardViewer loads the dashboard and the DashboardState object is deserialized and restored using the GetDataFromString method in the DashboardViewer.SetInitialDashboardState event.

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)

About

This example shows how to manage the dashboard state to save and restore selected master filter values, current drill-down levels and other selections such as the selected Choropleth Map's layer.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5