I have a bunch of buttons that each bring up the same context menu. I need the context menu to position itself at the mouse click on the button.
In ASP.NET this is accomplished by using code like this.
I cannot find anything on positioning a context menu or any possible parameters to show(). The MVC documentation is really thin and the examples only show so much.
In ASP.NET this is accomplished by using code like this.
function OpenAddRowMenu(event) {
var contextMenu = $("#AddRowMenu");
if ((!event.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), event.relatedTarget))) {
contextMenu.show(event);
}
else {
alert("Event error");
}
}
The button
<button class="btn btn-primary" onclick="OpenAddRowMenu(event); return false;">Add Row</button>
I cannot find anything on positioning a context menu or any possible parameters to show(). The MVC documentation is really thin and the examples only show so much.