SMART datagrid v.1 > Classes > GridBase
Specify the default 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 setContextMenu as null, it will run the menu specified by this function. If do not set the menu including this menu, it will run browser context menu. You can dynamically change the menu which will be run within onContextMenuPopup event handler.
var menu = [{
label: "Add Row",
callback: function () {
grdMain.insert();
grdMain.setFocus();
}
}, {
label: "Delete Rows",
callback: function () {
grdMain.deleteSelection();
}
}, {
label: "-" /* menu separator */
}, {
label: "Excel Export",
tag: 'excel'
}];
grdMain.setDefaultContextMenu(menu);