Back to Devexpress

DashboardState.Parameters Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboardstate.md

latest2.8 KB
Original Source

DashboardState.Parameters Property

Provides access to states of dashboard parameters.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public List<DashboardParameterState> Parameters { get; set; }
vb
Public Property Parameters As List(Of DashboardParameterState)

Property Value

TypeDescription
List<DashboardParameterState>

A collection of DashboardParameterState objects that are states of dashboard parameters.

|

Example

View Example: How to Save and Restore the Dashboard State

The following code snippet shows the CreateDashboardState method that adds parameter values to a dashboard state.

The DashboardState object contains states of individual dashboard items and currently selected parameter values. To add a parameter state to the entire dashboard state, use the DashboardState.Parameters property. The DashboardDesigner.SetDashboardState method applies the dashboard state to the loaded dashboard.

csharp
using DevExpress.DashboardCommon;
//...
public DashboardState CreateDashboardState() {
    DashboardState state = new DashboardState();
    //...
    state.Parameters.Add(new DashboardParameterState() {
        Name = "ParameterCountry",
        Value = "UK",
        Type = typeof(string)
    });
    return state;
}
vb
Imports DevExpress.DashboardCommon
'...
Public Function CreateDashboardState() As DashboardState
        Dim state As New DashboardState()
        '...
        state.Parameters.Add(New DashboardParameterState() With {.Name = "ParameterCountry", .Value = "UK", .Type = GetType(String)})
        Return state
    End Function

See Also

DashboardState Class

DashboardState Members

DevExpress.DashboardCommon Namespace