Skip to main content

DashboardBuilder.OnBeforeRender(String) Method

Specifies the JavaScript function (or its name) executed when the BeforeRender event is raised.

Namespace: DevExpress.DashboardAspNetCore

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

Declaration

public DashboardBuilder OnBeforeRender(
    string onBeforeRender
)

Parameters

Name Type Description
onBeforeRender String

A String object containing the JavaScript function (or its name) executed when the event is raised.

Returns

Type Description
DashboardBuilder

A reference to this instance after the operation has completed.

Remarks

Use the BeforeRender event to access the underlying ASP.NET Core wrapper:

@(Html.DevExpress().Dashboard()
    .Name("dashboardControl")
    .Width("100%")
    .Height("100%")
    .OnBeforeRender("onBeforeRender")
) 

The sender is the Web Dashboard’s underlying client part:

<head>
    <script>
        function onBeforeRender(sender) {
            var dashboardControl = sender;
            // Here you can customize a control.
        }
    </script>
</head>

You can now use its API to specify various client-side settings, perform actions, etc. See Client-Side Customization for information on how you can customize the client part of the Web Dashboard control.

See Also