PDA

View Full Version : [FIXED] [GXT 2.0-M2] RowUpdated Event doesn't contain anything



JensHeyer
26 May 2009, 5:09 AM
Hi everybody,

I'm trying to get a column which has been updated but the GridEvent Object doesn't contain anything. Here is a code Example:



this.grid.getView().addListener(Events.RowUpdated, new Listener<GridEvent<ModelData>>() {
public void handleEvent(GridEvent<ModelData> event) {
System.out.println(event.getRowIndex());
System.out.println(event.getModel());
}
});
The results are -1 and null

JensHeyer
26 May 2009, 10:51 PM
There must be a problem concerning the refreshRow method in the GridView class. What I've done now is to override the refreshRow method which fires a custom event to get updated row. Here is the workaround:



public static final EventType ROW_UPDATED = new EventType();

@Override
protected void refreshRow(int row) {
super.refreshRow(row);

GridEvent<ModelData> event = new GridEvent<ModelData>(this.grid);
event.setRowIndex(row);
event.setModel(this.ds.getAt(row));

Dispatcher.get().dispatch(GridView.ROW_UPDATED, event);
}

sven
2 Jun 2009, 3:13 PM
Fixed in SVN.