Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by patricia on Aug 19, 2008 23:38
open dhtmlx forum
Lock a cell or a column in grid

a have grid with 2 columns i need to lock the second column all over the grid but on addrow i need to make it editable
the type of the second column is combo
thank you
Answer posted by Support on Aug 20, 2008 02:51
You can use onEditCell event with logic similar to next

var allowed=null;
mygrid.attachEvent("onEditCell",function(stage,id,ind){
   if (ind == 1 && id!=allowed) return false;
   return true;
});
mygrid.attachEvent("onRowAdded",function(id){
   allowed = id;
});

in such case, second column will be editable only on last added row