I am trying to get the context menu’s selected menuItem id using below line of code :
var id = $$(“dtContextMenu”).getSelectedId(true);
It always returning the null value even after I selected the Menu item from the context menu. How can I get the selected Menu item id from the context menu.
By default, a menu doesn’t have selection at all.
When you clicking on a menu item, menu doesn’t select the clicked item, it just closes self. If you are using the related event handlers to catch the menu item click, you will receive the ID of clicked item as a parameter of event call.