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

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
Public Event ItemCaptionToolbarUpdated As ASPxClientDashboardItemCaptionToolbarUpdatedEventHandler

Event Data

The ItemCaptionToolbarUpdated event handler receives an argument of the ASPxClientDashboardItemCaptionToolbarUpdatedEventArgs type. 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 () {
              // ...
          }
      });
  }
}
See Also