Skip to main content
A newer version of this page is available. .

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

[DefaultValue("")]
[XtraSerializableProperty]
public string ItemWidgetCreated { get; set; }

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.

Example

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