Back to Devexpress

DashboardBuilder.BackendOptions(Action<DashboardBackendOptionsBuilder>) Method

dashboard-devexpress-dot-dashboardaspnetcore-dot-dashboardbuilder-dot-backendoptions-x28-system-dot-action-devexpress-dot-dashboardaspnetcore-dot-dashboardbackendoptionsbuilder-x29.md

latest2.7 KB
Original Source

DashboardBuilder.BackendOptions(Action<DashboardBackendOptionsBuilder>) Method

Specifies options that allow you to configure the Web Dashboard’s back-end.

Namespace : DevExpress.DashboardAspNetCore

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

NuGet Package : DevExpress.AspNetCore.Dashboard

Declaration

csharp
public DashboardBuilder BackendOptions(
    Action<DashboardBackendOptionsBuilder> config
)
vb
Public Function BackendOptions(
    config As Action(Of DashboardBackendOptionsBuilder)
) As DashboardBuilder

Parameters

NameTypeDescription
configAction<DashboardBackendOptionsBuilder>

A delegate that provides access to the Web Dashboard’s back-end options.

|

Returns

TypeDescription
DashboardBuilder

A reference to this instance after the operation has completed.

|

Remarks

Use the BackendOptions method to specify server settings for the client dashboard application.

The code sample below shows how to configure the client: to set the server’s URL and pass a custom Authorization header. Note that the Uri value should consist of a base URL where the Web Dashboard’s server side is hosted and a route prefix - a value that is set in the MVC / .NET Core MapDashboardRoute properties.

cshtml
@(Html.DevExpress().Dashboard("dashboardControl1")
    .BackendOptions(options => options.Uri("{baseURL}/api/dashboard").RequestHttpHeaders(headers => { headers.Add("Authorization", "AuthToken123"); }))
)

See Also

DashboardBuilder Class

DashboardBuilder Members

DevExpress.DashboardAspNetCore Namespace