The requested page is not available for the requested platform. You are viewing the content for Default platform.

DashboardViewerApiOptionBuilder.OnItemWidgetUpdated(String) Method

Specifies the JavaScript function (or its name) executed when the client widget is updated.

Namespace: DevExpress.DashboardAspNetCore

Assembly: DevExpress.Dashboard.v19.1.AspNetCore.dll

Declaration

public DashboardViewerApiOptionBuilder OnItemWidgetUpdated(
    string onItemWidgetUpdated
)
Public Function OnItemWidgetUpdated(
    onItemWidgetUpdated As String
) As DashboardViewerApiOptionBuilder

Parameters

Name Type Description
onItemWidgetUpdated String

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

Returns

Type Description
DashboardViewerApiOptionBuilder

A reference to this instance after the operation has completed.

Remarks

Note

The dashboard item is re-created when you maximize / restore the item. All events connected with dashboard item life cycle (such as ItemWidgetCreated, ItemWidgetUpdated are fired again.

Note

The ItemWidgetUpdated event is not fired for a custom dashboard item.

The following code shows how to handle the ItemWidgetCreated, ItemWidgetUpdated, and ItemWidgetUpdating events:

<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0;">
@(Html.DevExpress().Dashboard("dashboardControl1")
    .Width("100%")
    .Height("100%")
    .UseNeutralFilterMode(true)
    .Extensions(e => e.ViewerApi(v => v.OnItemWidgetCreated("function(s, e) { customizeWidgets(s, e); }")))
    .Extensions(e => e.ViewerApi(v => v.OnItemWidgetUpdated("function(s, e) { customizeWidgets(s, e); }")))
    .Extensions(e => e.ViewerApi(v => v.OnItemWidgetUpdating("function(s, e) { unsubscribeFromEvents(s, e); }")))
)
</div>
See Also