DashboardClientSideEvents.ItemWidgetCreated Property

Gets or sets the name of the JavaScript function or the entire code which will handle the client ASPxClientDashboardViewer.ItemWidgetCreated event.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.dll

Declaration

[XtraSerializableProperty]
public string ItemWidgetCreated { get; set; }
<XtraSerializableProperty>
Public Property ItemWidgetCreated As String

Property Value

Type Default Description
String

String.Empty

A string that is either the name of a JavaScript function or the entire JavaScript function code used to handle an event.

Examples

This example demonstrates how to customize client widgets used to visualize data within dashboard items at runtime using ASPxClientDashboardViewer's API.

The following options are changed:

@model DevExpress.DashboardWeb.Mvc.DashboardSourceModel
@Html.DevExpress().DashboardViewer(settings => {
    settings.Name = "DashboardViewer";
    settings.CallbackRouteValues = new { Controller = "Home", Action = "DashboardViewerPartial" };
    settings.ExportRouteValues = new { Controller = "Home", Action = "DashboardViewerPartialExport" };
    settings.ClientSideEvents.ItemWidgetCreated = "function(s, e) { customizeWidgets(e); }";
    settings.ClientSideEvents.ItemWidgetUpdated = "function(s, e) { customizeWidgets(e); }";
    settings.ClientSideEvents.ItemWidgetUpdating = "function(s, e) { unsubscribeFromEvents(e); }";
    settings.Width = 1200;
}).BindToSource(Model).GetHtml()
See Also