DashboardBuilder.InitialDashboardState(String) Method

Specifies the initial state of the loaded dashboard.

Namespace: DevExpress.DashboardAspNetCore

Assembly: DevExpress.Dashboard.v21.1.AspNetCore.dll


public DashboardBuilder InitialDashboardState(
    string initialDashboardState


Name Type
initialDashboardState String


Type Description

A reference to this instance after the operation has completed.


Use the InitialDashboardState method to set the identifier of the dashboard to which the state is applied.

To specify the initial dashboard state, initialize the DashboardState object on a server, save this object to JSON using the SaveToJson(DashboardState) method and assign the resulting string to InitialDashboardState.

The following example shows how to load a dashboard with previously selected filter values.

public class HomeController : Controller {
  public IActionResult Index() {
    DashboardState dashboardState = new DashboardState();

    DashboardItemState gridFilterState = new DashboardItemState("gridDashboardItem1");
    gridFilterState.MasterFilterValues.AddRange(new List<object[]>() {
      new string[1] { "Condiments" },
      new string[1] { "Produce" }

    dashboardState.Items.AddRange(new List<DashboardItemState>() {

    return View(dashboardState);
See Also