Skip to main content

Popup Menus

  • 3 minutes to read

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).

Standard Menus

A standard popup menu can be invoked in the following areas.

Dashboard Item

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.

DataShaping_Filtering_EditFilterMenuItem

Dashboard Item Caption

The popup menu invoked in the dashboard item caption provides the same set of commands, with the exception of the capability to design dashboard/dashboard items.

dashboard item caption command buttons

Dashboard Title

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.

WinViewer_Printing

Customize Popup Menu

Popup menu items can be divided into two categories: Runtime Items and Design-time Items.

Popup Menu Items

  • Runtime 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

    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 sections.

To customize a dashboard popup menu, handle the DashboardViewer.PopupMenuShowing and the DashboardDesigner.PopupMenuShowing events that 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.

See Also