I have a number List Boxes with a single context menu that is shared across them.
The context menu correctly displays when I right click the list box item but it doesn't seem to set the target value of the Select or Open events.
The menu configuration is:
@(Html.Kendo().ContextMenu() .Name("listbox_contextmenu") .Target("[role=listbox]") .Filter("[role=option]") .Orientation(ContextMenuOrientation.Vertical) .Animation(animation => { animation.Open(open => { open.Fade(FadeDirection.In); open.Duration(500); }); }) .Items(items => { items.Add().Text("Escalate to Management"); items.Add().Separator(true); items.Add().Text("Email Allocated User"); }) .Events(events => { events.Open("contextMenuOpen").Select("contextMenuSelect"); }))
The java script function do nothing at the moment:
function contextMenuOpen(e) { alert('e.item is ' + JSON.stringify($(e.item))); alert('e.target is ' + JSON.stringify($(e.target)));}function contextMenuSelect(e) { alert('e.item is ' + JSON.stringify($(e.item))); alert('e.target is ' + JSON.stringify($(e.target)));}
I'm hoping you can point out what I'm doing wrong here.
Many Thanks,
Rob
