How do I make some rows editable and some rows non-editable in slickgrid?
Asked
Active
Viewed 7,530 times
2 Answers
11
Set the onBeforeEditCell event handler and return false to prevent the cell from going into edit mode.
-
2Thanks Tin, adding the following code to the grid did the trick. grid.onBeforeEditCell = function(row, col, row) { if(row['key'] == "value") return false; }; – ranendra Feb 02 '11 at 08:15
1
Or you can simply designate some columns not to be editable without specifying any editor attribute.
Ex
columns = [
{id:"id",name:"#",field:"id"},
{id:"editable",name:"clicky",field:"editable",editor:Slick.Editors.Text}
];
Depends if you want to loop an auxiliary array and apply if criteria.
Hope it helps

cristi _b
- 1,783
- 2
- 28
- 43