PDA

View Full Version : How to keep users from selecting certain cells in an editable grid



blomasky
6 Dec 2013, 11:17 AM
I have a grid with only certain columns editable. However, the user can click and highlight ANY cell. How can I stop him (her / it) from clicking and selecting cells that are not editable?

thanks

bruce

scottmartin
6 Dec 2013, 12:02 PM
Something like this?



beforeedit: function(ed, context){
if (ed.field === 'price') { // no price changes!
return false;
}
}




listeners: {
beforeedit: function(ed, context){
if (context.value === 'Bart') {
return false; // leave bart alone!
}
}
}

blomasky
6 Dec 2013, 12:27 PM
sorry perhaps I didn't explain it well. I have already handled the fact they can not edit the field. HOWEVER, they can still select the field. That is what I want to stop.Bruce