ASPxClientDashboard.ItemCaptionToolbarUpdated Event
Allows you to customize a dashboard item’s caption (for instance, add custom buttons, menus, etc.).
Namespace: DevExpress.DashboardWeb.Scripts
Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.Scripts.dll
Declaration
public event ASPxClientDashboardItemCaptionToolbarUpdatedEventHandler ItemCaptionToolbarUpdated
Event Data
The ItemCaptionToolbarUpdated event's data class is ASPxClientDashboardItemCaptionToolbarUpdatedEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
ItemName | Gets a component name of the dashboard item. |
Options | Provides access to caption options of the dashboard item. |
Remarks
You can handle the ItemCaptionToolbarUpdated event to customize the dashboard item’s caption. For instance, you can add custom command buttons, create additional menus, add static texts, etc. The DashboardItemCaptionToolbarOptions class contains options used to customize a dashboard item caption’s elements (the ViewerToolbarItem objects).
The following code snippets show how to add a custom button to the Chart’s caption. This button belongs to the actionItems collection and is displayed only when the mouse pointer hovers over the dashboard item’s caption.
function onItemCaptionToolbarUpdated(s, e) {
if (e.ItemName === "chartDashboardItem1") {
e.Options.actionItems.push({
type: "button",
text: "Custom Button",
click: function () {
// ...
}
});
}
}