SMART datagrid v.1 > Classes > GridBase
Set the menu which will be run as grid context menu. You can specify the menu name registered by registerPopupMenu or new menu information object. If specify null, it will run the default menu set by setDefaultContextMenu.
If do not set the menu including default menu, it will run browser context menu. You can dynamically change the menu which will be run within onContextMenuPopup event handler.
grdMain.setContextMenu([{
label: "Add Row",
callback: function () {
grdMain.insert();
grdMain.setFocus();
}
}, {
label: "Delete Rows",
callback: function () {
grdMain.deleteSelection();
}
}, {
label: "-" /* menu separator */
}, {
label: "Excel Export",
tag: 'excel'
}]);