disable context menu

Im trying to disable a context menu of a grid (pro 2.0). In grid 1.5 this works fine: aMenu.disableMenu(true); but in the new version it is not working. Is it a new function that replace this one?


Grid context menu can be disabled using onBeforeContextMenu event handler. If it returns false, the menu won’t be shown.


The following code disables context menu for the second column:


function pre_func(rowId,celIndex,grid){
if (celIndex==1) return false;
return true;
}



grid.attachEvent(“onBeforeContextMenu”,pre_func);