Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 14, 2009 14:33
open dhtmlx forum
conditional context menu

How to display context menu for particular row based on some condition (e.g. cell atribute), but no menu for all other rows?
Answer posted by Support on Jan 15, 2009 02:15
In grid you can attach context menu for whole grid and use onBeforeContextMenu event to allow|deny menu showing

mygrid.attachEvent("onBeforeContextMenu",function(id,ind){
    if (some_check(id,ind) return true;//allow
    return false;
});