mattpainter
28 Jan 2010, 5:25 PM
Hi,
I have a Live Grid with many columns and a separate editing panel for the grid's fields.
I am successfully updating the grid's store with the model data from the edit panel, however I would like to re-render only the affected row in the grid and cannot determine how.
The Javadocs for Store indicate that the grid is automatically updated, however my code below doesn't appear to:
grid.getStore().update(model);I resorted to the rather nasty code to re-render the grid:
grid.getStore().fireEvent(ListStore.DataChanged, new StoreEvent<ItemGridModel>(grid.getStore()));however this resets the grid's horizontal scrolling. The grid has around 30 columns so this is not ideal. Ideally, I'd like for the user to be able to scroll to a position in the grid, edit the fields for the selected row, hit save and for the grid to not move.
Is there a simple re-render row event that can be fired? I've dug through the editable grid code in GXT for the closest equivalent and can't see anything obvious. I could try View.focusCell() but I suspect this will still make the grid jump.
Any pointers would be appreciated.
Thanks,
Matt
I have a Live Grid with many columns and a separate editing panel for the grid's fields.
I am successfully updating the grid's store with the model data from the edit panel, however I would like to re-render only the affected row in the grid and cannot determine how.
The Javadocs for Store indicate that the grid is automatically updated, however my code below doesn't appear to:
grid.getStore().update(model);I resorted to the rather nasty code to re-render the grid:
grid.getStore().fireEvent(ListStore.DataChanged, new StoreEvent<ItemGridModel>(grid.getStore()));however this resets the grid's horizontal scrolling. The grid has around 30 columns so this is not ideal. Ideally, I'd like for the user to be able to scroll to a position in the grid, edit the fields for the selected row, hit save and for the grid to not move.
Is there a simple re-render row event that can be fired? I've dug through the editable grid code in GXT for the closest equivalent and can't see anything obvious. I could try View.focusCell() but I suspect this will still make the grid jump.
Any pointers would be appreciated.
Thanks,
Matt