dashboard-devexpress-dot-dashboardaspnetcore-dot-dashboardbuilder-dot-onbeforerender-x28-system-dot-string-x29.md
Specifies the JavaScript function (or its name) executed when the BeforeRender event is raised.
Namespace : DevExpress.DashboardAspNetCore
Assembly : DevExpress.Dashboard.v25.2.AspNetCore.dll
NuGet Package : DevExpress.AspNetCore.Dashboard
public DashboardBuilder OnBeforeRender(
string onBeforeRender
)
Public Function OnBeforeRender(
onBeforeRender As String
) As DashboardBuilder
| Name | Type | Description |
|---|---|---|
| onBeforeRender | String |
A String object containing the JavaScript function (or its name) executed when the event is raised.
|
| Type | Description |
|---|---|
| DashboardBuilder |
A reference to this instance after the operation has completed.
|
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