nbuesing
23 Dec 2011, 10:35 AM
I have not used Ext GWT 2.x, so I don't know if these are bugs, or just user error.
1. If I use a GridInlineEditor and my Grid has combo boxes, I cannot push the saved values back to the datastore. However, GridRowEditor works just fine.
2. I cannot find a way to do any cancel edits. I have a table where a cell is editable only if something else on the row is set to certain state. It seems I should be able to do inspect my row and cancel the edit, but nothing I can find works. I've tried this.
editor.addBeforeStartEditHandler(new BeforeStartEditHandler<Row>() { public void onBeforeStartEdit(BeforeStartEditEvent<Row> event) {
event.setCancelled(true);
}
});
Now if I look at the GridRowEditing, I done see how editing is ever canceled (the BeforeStartEditEvent is created (no events firing on it) and the isCancelled() would also be false (I think).
@Override
public void startEditing(GridCell cell) {
if (getEditableGrid() != null && getEditableGrid().isAttached() && cell != null) {
CancellableEvent ce = new BeforeStartEditEvent<M>(cell);
if (ce.isCancelled()) {
return;
}
cancelEditing();
M value = getEditableGrid().getStore().get(cell.getRow());
Any information/thoughts on this would be appreciated.
1. If I use a GridInlineEditor and my Grid has combo boxes, I cannot push the saved values back to the datastore. However, GridRowEditor works just fine.
2. I cannot find a way to do any cancel edits. I have a table where a cell is editable only if something else on the row is set to certain state. It seems I should be able to do inspect my row and cancel the edit, but nothing I can find works. I've tried this.
editor.addBeforeStartEditHandler(new BeforeStartEditHandler<Row>() { public void onBeforeStartEdit(BeforeStartEditEvent<Row> event) {
event.setCancelled(true);
}
});
Now if I look at the GridRowEditing, I done see how editing is ever canceled (the BeforeStartEditEvent is created (no events firing on it) and the isCancelled() would also be false (I think).
@Override
public void startEditing(GridCell cell) {
if (getEditableGrid() != null && getEditableGrid().isAttached() && cell != null) {
CancellableEvent ce = new BeforeStartEditEvent<M>(cell);
if (ce.isCancelled()) {
return;
}
cancelEditing();
M value = getEditableGrid().getStore().get(cell.getRow());
Any information/thoughts on this would be appreciated.