Gird - Prevent editing of certain Items


is it possible to prevent the editing for certain item ids?

Something like

grid.setItemEditable(itemId, false);

Thank you already!


Never tried but implementing your own DefaultEditorEventHandler should do the job :


Yeah, I usually use this:

Grid grid = new Grid(beanItemContainer);

Thank you for your suggestion. So as far as I can see I have to replace this handler on the client side, extend the grid and create a custom grid for it, correct?

I think I will create an enhancement request for this, as I think this is a common use case that one wants to prevent editing of certain items.

@Alisa Lee:
This only prevents the editing of a certain column (property) not row (item).


You do not need to extend Grid nor create a custom grid. you need to extend DefaultEditorEventHnadler and make a grid.setEditorEventHandler() with your own class