Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for WinForms - Set the Initial Dashboard State in Designer

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 DashboardDesigner.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 DashboardDesigner loads the dashboard and the DashboardState object is deserialized and restored using the GetDataFromString method in the DashboardDesigner.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)

Contributors 4

  •  
  •  
  •  
  •