BasePopupMenuShowingEventArgs.ShowCustomMenu(IDXDropDownControlEx) Method
Invokes a custom context menu instead of the control’s menu.
Namespace: DevExpress.Utils.Menu
Assembly: DevExpress.Utils.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
popupMenu | DevExpress.Utils.Menu.IDXDropDownControlEx | A custom context menu. |
Remarks
To use the ShowCustomMenu
method, you must:
- Create a custom context menu (PopupMenu) as demonstrated in the following help topic: Popup Menus.
- Pass this menu to the
ShowCustomMenu
method as a parameter.
The code sample below uses the ShowCustomMenu
method to invoke a custom context menu when a user right-clicks a grid row:
void gridView1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e) {
if (e.MenuType == GridMenuType.Row)
e.ShowCustomMenu(popupMenu1);
}
Common concepts for custom context menus are listed in the following help topic: Custom Context Menus.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowCustomMenu(IDXDropDownControlEx) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.