Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to change default menu items and actions in the popup menu

$
0
0

This demo project shows and how to add a new menu item and assign a built-in scheduler action to it.
The project is composed of two pages, you can switch between them by using a button at the top left.

The page named DefaultItemWithCustomAction illustrates how to change the default action assigned to a menu item. It uses two different techniques to modify the existing menu.
One technique involves a JavaScript function defined in the page markup that replaces the default GoTo command with a custom handler. The PopupMenuShowing event is handled to specify a JavaScript handler.
Another technique implements a CustomMenuViewCallbackCommand that is used to perform a callback. The BeforeExecuteCallbackCommand event should be handled to process the command. The PopupMenuShowing event is handled to rename a menu item so it can be properly recognized by a custom callback command.
The page named CustomItemWithDefaultAction adds two new menu items - MyOpenAppoinment that executes a built-in "Open Appointment" command and Make Important item that executes the same command as a menu item that labels the appointment as "Important". The name for the menu item is obtained from a corresponding item contained in the "Label As" submenu.



Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>