ales
7 Mar 2011, 7:56 AM
Hi,
I'm working on a project in which I have an editable grid.
In my grid, I have to disable a particular cell according to a property in my model.
I tried some methods, but I never could disable my particular cell.
I also tried the method below but it doesn't work (I think the event was never catched) :
grid.getSelectionModel().addListener(Events.BeforeSelect, new Listener<SelectionEvent<Stock>>() {
public void handleEvent(SelectionEvent<Stock> be) {
if (be.getIndex() == 0) {
be.setCancelled(true);
}
}
});
Can anyone help me ? I'm lost...
Thanks
I'm working on a project in which I have an editable grid.
In my grid, I have to disable a particular cell according to a property in my model.
I tried some methods, but I never could disable my particular cell.
I also tried the method below but it doesn't work (I think the event was never catched) :
grid.getSelectionModel().addListener(Events.BeforeSelect, new Listener<SelectionEvent<Stock>>() {
public void handleEvent(SelectionEvent<Stock> be) {
if (be.getIndex() == 0) {
be.setCancelled(true);
}
}
});
Can anyone help me ? I'm lost...
Thanks