Note: To run in Opera Browser RadContextMenu
needs
right-clicks allowed. This is done by using "Tools -> Preferences -> Advanced ->
JavaScript options -> Allow script to receive right clicks". In addition,
because of browser limitations, on right-click both RadContextMenu
and the standard browser context menu are displayed. A workaround to the latter
is using the ESC key to hide the default browser context menu.
The purpose of this example is to demonstrate how flexibly the context menu can be
used.
The example above shows how to show the context menu upon mouseover
and mouseclick
on different HTML DOM elements. In addition, the
context menu uses custom coordinates to display at a specific position.
You should use the showAt
method of the context menu client-side
object to show the menu at a pre-defined position, like:
var contextMenu = $find("<%= RadContextMenu1.ClientID %>");
var x = parseInt($get("contextX").value);
var y = parseInt($get("contextY").value);
contextMenu.showAt(x, y);