CellContextMenu
methodsGets the contextMenu instance of the cell.
Dynamically adding a context menu item and associating a selection command
pseudo
<div id="spreadsheet"></div>
<script>
$(function() {
var spreadsheet = $("#spreadsheet").kendoSpreadsheet().data("kendoSpreadsheet"),
cellContextMenu = spreadsheet.cellContextMenu();
cellContextMenu.append([{ text: "Highlight", cssClass: "highlight" }]);
cellContextMenu.bind("select", function(e) {
var command = $(e.item).text();
if(command == "Highlight") {
var sheet = spreadsheet.activeSheet(),
selection = sheet.selection();
selection.background("green");
}
});
});
</script>
- The menu instance.