contextMenu.body.itemsArray
Specifies the items of the item.
Example
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
contextMenu: {
body: [
{
text: "Custom Command",
icon: "calendar",
items: [
{ text: "Nested Custom Command", icon: "home", command: "NestedCustomCommand" }
]
},
'select'
]
},
dataSource: new kendo.data.DataSource({
schema: {
model: {
id: "foo",
fields: {
name: "name",
foo: "foo",
},
},
},
data: [
{ foo: "bar", name: "tom" },
{ foo: "baz", name: "jerry" },
],
}),
});
kendo.ui.grid.commands["NestedCustomCommand"] = kendo.ui.grid.GridCommand.extend({
exec: function(e) {
alert("Custom Command Executed")
}
});
</script>
In this article