colHeaderContextMenu
Gets the contextMenu
instance of the column header.
Returns
kendo.ui.ContextMenu
- The menu instance.
Example - removing the hide command for the first column in the colHeaderContextMenu
<div id="spreadsheet"></div>
<script>
$(function() {
var spreadsheet = $("#spreadsheet").kendoSpreadsheet().data("kendoSpreadsheet"),
colContextMenu = spreadsheet.colHeaderContextMenu();
colContextMenu.bind("open", function(e) {
var menu = e.sender;
var spread = $(e.target).getKendoSpreadsheet();
var sheet = $(e.target).getKendoSpreadsheet().activeSheet();
var selected = sheet.select();
var colNumber = selected.topLeft.col;
if (colNumber === 0) {
$('li[data-action="hide-column"]').hide();
} else {
$('li[data-action="hide-column"]').show();
}
});
});
</script>