ASPxClientDashboard.SetDashboardState(String) Method
Applies the dashboard state to the loaded dashboard.
Namespace: DevExpress.DashboardWeb.Scripts
Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.Scripts.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
dashboardStateString | String | A string value that specifies the state of the dashboard displayed in the ASPxClientDashboard. |
Remarks
The DashboardState class includes states of individual dashboard items (the DashboardState.Items property) and currently selected parameter values (DashboardState.Parameters).
The following examples demostrates how to pass a string that contains a dashboard state.
var state = '{"Items":{"gridItem1":{"MasterFilterValues":[[2018]]},"cardItem1":{"MasterFilterValues":[["Manufacturing"]]}}}';
clientDashboard1.SetDashboardState(state);
- Set a drill-down value for the Chart dashboard item:
var state = '{"Items":{"chartItem1":{"DrillDownValues":["Web Forms"]}}}';
clientDashboard1.SetDashboardState(state);
- Set a dashboard parameter value and a master-filter value for the Card dashboard item:
var state = '{"Parameters":{"Year":2017},"Items":{"card1":{"MasterFilterValues":[["Petroleum Products"]]}}}';
clientDashboard1.SetDashboardState(state);
- Specify a tab page:
var state = '{"Items":{"tabContainerDashboardItem1":{"TabPageName":"pageDashboardItem2"}}}';
clientDashboard1.SetDashboardState(state);
To learn more about a dashboard state, see Manage Dashboard State.
See Also