Hi,
I am using gwt comet to push data into my grid data source. I have a collection of all records added to the data source and when some data arrives i update the appropriate record from the collection with record.setAttribute("fieldtoupdate", pushedValue). But this does not update the grid. I need to call :
grid.refreshRow(grid.getRecordIndex(record)) in order to update the ui grid. All this is happening in the data source and i have :
But in order to use this i need to have reference to the grid object in my data source, which is not correct. So any ideas how from the data source i can tell the grid to update it's record?
Regards.
I am using gwt comet to push data into my grid data source. I have a collection of all records added to the data source and when some data arrives i update the appropriate record from the collection with record.setAttribute("fieldtoupdate", pushedValue). But this does not update the grid. I need to call :
grid.refreshRow(grid.getRecordIndex(record)) in order to update the ui grid. All this is happening in the data source and i have :
Code:
public class UpdatableListGridRecord extends ListGridRecord implements UpdateListener {
private ListGrid grid;
public UpdatableListGridRecord(ListGrid grid) {
this.grid = grid;
}
@Override
public void update(double pushedValue) {
this.setAttribute("pushedValue", pushedValue);
grid.refreshRow(grid.getRecordIndex(this));
}
}
Regards.
Comment