Back to Devexpress

DxDashboard.WorkingMode Property

dashboard-devexpress-dot-dashboardblazor-dot-dxdashboard-db25c3b0.md

latest3.4 KB
Original Source

DxDashboard.WorkingMode Property

Specifies the Dashboard component’s working mode.

Namespace : DevExpress.DashboardBlazor

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

NuGet Package : DevExpress.Blazor.Dashboard

Declaration

csharp
[Parameter]
public WorkingMode WorkingMode { get; set; }
vb
<Parameter>
Public Property WorkingMode As WorkingMode

Property Value

TypeDescription
WorkingMode

A value that specifies the Dashboard component’s working mode.

|

Available values:

NameDescription
Designer

The Web Dashboard acts as a Dashboard Designer and allows end users to create, edit, and save dashboards. You can switch to Viewer mode on the client side from this mode.

| | Viewer |

The Web Dashboard acts as a Dashboard Viewer and allows you to display dashboards to end users. You can switch to Designer mode on the client side from this mode.

| | ViewerOnly |

The Web Dashboard acts as a Dashboard Viewer without the capability to switch to Designer mode on the client side. In this mode, the Web Dashboard does not load the extensions required for designing dashboards.

|

Remarks

The WorkingModeChanged event fires when the WorkingMode is changed.

The following code allows you to switch the working mode when a user clicks the button. The button text depends on the current working mode:

razor
<button id="workingModeSwitcher" @onclick="ChangeWorkingMode">    
    @ButtonText
</button>

<DxDashboard style="height: 800px" Endpoint="api/dashboard" @bind-WorkingMode="@workingMode">
</DxDashboard>

@code {
    WorkingMode workingMode = WorkingMode.Designer;

    public void ChangeWorkingMode() {
        workingMode = workingMode == WorkingMode.Designer ? WorkingMode.Viewer : WorkingMode.Designer;
    }

    public string ButtonText {
        get {
            string value = workingMode == WorkingMode.Designer ? "Viewer" : "Designer";
            string mode = "Switch to " + value;
            return mode;
        }
    }
}

See Also

DxDashboard Class

DxDashboard Members

DevExpress.DashboardBlazor Namespace