The DashboardDesigner and DashboardViewer controls provide several types of popup menus that allow end-users to perform actions related to dashboard items or the entire dashboard. For example, Dashboard Designer popup menus include actions allowing end-users to design dashboard or individual dashboard items. Both controls provide context menus that allow end-users to perform interactivity actions, to print or export dashboard/dashboard items, etc.
You can customize dashboard popup menus in two ways: at design time after creating a ribbon or toolbar menu (for the DashboardDesigner control), or at runtime using the PopupMenuShowing event (for both controls).
A standard popup menu can be invoked in the following areas.
This popup menu can be invoked when end-users right-click the dashboard item and provides the capability to do the following actions, depending on the dashboard item type.
- design dashboard items or the entire dashboard;
- perform interactivity actions;
- print and export a dashboard item;
- switch between different sets of values, etc.
Dashboard Item Caption
This popup menu can be invoked when end-users click a command button in the dashboard title. For example, end-users can print or export the entire dashboard using the Export To button.
Customizing Popup Menu
Popup menu items can be divided into two categories: Runtime Items and Design-time Items.
Runtime items provide access to commands related to interactivity actions, printing and exporting, etc. These items are created by the DashboardDesigner/DashboardViewer controls at runtime and can be customized using the PopupMenuShowing events.
Design-time items provide access to commands allowing end-users to customize dashboard items and the entire dashboard in the Dashboard Designer. These items are created during RibbonControl or BarManager initialization. To learn how to customize a popup menu at design time, see the Ribbon, Bars and Menu topics.
To customize a dashboard popup menu by using events, use the DashboardViewer.PopupMenuShowing and the DashboardDesigner.PopupMenuShowing events, which are raised when an end-user invokes a popup menu.
To identify the popup menu location, use the DashboardPopupMenuShowingEventArgs.DashboardArea property. To get the area of the dashboard item for which the event has been raised, use the DashboardPopupMenuShowingEventArgs.DashboardItemArea property. To obtain the dashboard item name for which the event has been raised, use the DashboardItemMouseEventArgs.DashboardItemName property. To identify the clicked command button, use the DashboardPopupMenuShowingEventArgs.ButtonType property.
Use the DashboardPopupMenuShowingEventArgs.Menu property to customize a popup menu. To prevent end-users from invoking a popup menu, set the DashboardPopupMenuShowingEventArgs.Allow property to false or assign null to the DashboardPopupMenuShowingEventArgs.Menu property.