Reputation: 2075
I'm using this context menu example.
I used the context menu select event like this:
menu = $("#menu").kendoContextMenu({
target: "#listview-context-menu",
filter: ".product",
animation: {
open: { effects: "fadeIn" },
duration: 500
},
select: onSelect
});
function onSelect(e) {
console.log(e);
}
It's working fine, but now I'm getting the current menu object. How can I get selected row data instead?
For example, I have right-clicked on "RE: New version of Telerik Trainer (1st one record)" and then click on reply to sender, so how can I get row object of current row.
Upvotes: 1
Views: 963
Reputation: 1963
You can get the reference to the datarow by using the snippet below
function onSelect(e) {
var lst =$("#listview-context-menu").getKendoListView();
var row = lst.dataItem(e.target);
console.log(row);
}
Please refer the fiddle here for a demo
Upvotes: 1