Skip to main content

DashboardBuilder.InitialDashboardState(String) Method

Specifies the initial state of the loaded dashboard.

Namespace: DevExpress.DashboardAspNetCore

Assembly: DevExpress.Dashboard.v22.2.AspNetCore.dll

NuGet Package: DevExpress.AspNetCore.Dashboard


public DashboardBuilder InitialDashboardState(
    string initialDashboardState


Name Type Description
initialDashboardState String

A string that defines the initial dashboard state.


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 sample illustrates how to specify a dashboard state (such as a master filter or parameter values) in code and how to apply this state when loading a dashboard for the first time. In this example, the DashboardState object defined in the Controller stores the dashboard state. The MVC approach is used to pass the specified dashboard state to the View’s DashboardBuilder.InitialDashboardState property and use this state when loading a dashboard.

View Example: ASP.NET Core

@model DevExpress.DashboardCommon.DashboardState
<div style="position: absolute; left:0;top:0;right:0;bottom:0;">
        .Extensions(extension => extension.UrlState(state => state.IncludeDashboardStateToUrl(true)))
See Also