PDA

View Full Version : Is it possible to turn off editing for a particular row?


jack.slocum
09-28-2006, 03:08 PM
VATech1993 Says:
Is it possible to turn off editing for a particular row or a particular column within a specific row?

Yes, all edit operations first validate with the ColumnModel to make sure the cell is editable. The default implementation uses editable:true or editor != null in the ColumnModel config, but you could override the method to perform different logic. The method to override is isCellEditable(colIndex, rowIndex).

Example:

yourColumnModel.isCellEditable = function(colIndex, rowIndex){
if(colIndex == 2 || rowIndex == 4){ // or whatever
return false;
}
return true;
};