The requested page is not available for the requested platform. You are viewing the content for Default platform.

Manage Dashboard State

A dashboard state describes the changes resulting from end-user interaction. The dashboard state is the DashboardState class instance and can contain the following objects:

Dashboard State Object


Selected master filter values for dashboard items.


Current drill-down levels for dashboard items.


Selected Range Filter interval.


Selected dashboard item layers for the following items:


A selected tab page.


Dashboard parameter values.


Use the DashboardState.Items property to get access to the dashboard item state collection.

The DashboardDesigner provides the following API to manage the dashboard state:

Member Description
DashboardDesigner.GetDashboardState Gets the current dashboard state.
DashboardDesigner.SetDashboardState Applies the dashboard state to the loaded dashboard.
DashboardDesigner.SetInitialDashboardState Allows you to specify the initial dashboard state when loading a dashboard.


The following code snippet shows how to set a dashboard state for WinForms Dashboard Designer in code:

using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
using System.Collections.Generic;

// ...
public void ApplyDashboardState(DashboardDesigner dashboardDesigner) {
    DashboardState state = new DashboardState();
    // Sets a range for a Range Filter.
    state.Items.Add(new DashboardItemState("rangeFilterDashboardItem1") { 
    RangeFilterState = new RangeFilterState(new RangeFilterSelection(new DateTime(2015, 1, 1), new DateTime(2017, 1, 1))) 
    // Specifies master filter and drill-down values.
    state.Items.Add(new DashboardItemState("gridDashboardItem1") {
        MasterFilterValues = new List<object[]>() { new object[] { "Cycling Cap" } },
        DrillDownValues = new List<object>() { "Clothing" },
    // Sets a dashboard item layer.
    state.Items.Add(new DashboardItemState("choroplethMapDashboardItem1") {
        SelectedLayerIndex = 1
    // Specifies a default tab page.
    state.Items.Add(new DashboardItemState("tabContainer1") {
        TabPageName = "salesTabPage"
    // Defines a dashboard parameter value.
    state.Parameters.Add(new DashboardParameterState() {
        Name = "categoryParam",
        Value = "Beverages",
        Type = typeof(string)