PDA

View Full Version : How to reload a grid after its JsonStore changed?



danielking
24 Oct 2007, 7:46 AM
Normally, data on a JsonStore was loaded from remote by using load() or reload().
But sometimes, For example:
The grid(EditorGridPanel) shows some records. I want to add a new record to the grid.
I add a blank record manually to the store, and I wish a blank row appear in the grid, then edit, and then save.

How to do this?

tryanDLS
24 Oct 2007, 8:50 AM
Try grid.getView().refresh()

danielking
24 Oct 2007, 5:00 PM
>>> components_list.store
Object data=[9] baseParams=Object paramNames=Object
>>> components_list.store.add(new Ext.data.Record({name:'aabbcc'}))
>>> components_list.store
Object data=[10] baseParams=Object paramNames=Object
>>> components_list.view.refresh()

this doesn't work.

Domi
5 Nov 2007, 1:39 AM
I posted it as a bug: http://extjs.com/forum/showthread.php?p=82067#post82067