#14964 closed defect (invalid)
EnhancedGrid does not reflect Store changes
Reported by: | dtresse | Owned by: | Evan |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | DojoX Grid | Version: | 1.6.0rc1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hi,
I try to update an ItemFileReadStore used by a EnhancedGrid and the grid does not reflects changes made to "data" attribute of the Store as a ComboBox linked to the same store reflects changes.
I've used an example from Dojo reference documentation to illustrate this issue.
Tested on Firefox 1.10.02 & Chrome 17.0.963.56
An HTML page showing the test if provided.
Did
Attachments (1)
Change History (4)
Changed 9 years ago by
Attachment: | grid_and_store_issue.html added |
---|
comment:1 follow-up: 3 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 9 years ago by
I've used this way to update data in the grid (because the way in my test case is not working). I originally tried to do this way, because ComboBox is working like this and because I read in the reference documentation this sentence :
' Since DataGrid is “DataStoreAware”, changes made to the store will be reflected automatically in the DataGrid '
in http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html#dojox-grid-datagrid
In fact, it's only true for newItem & deleteItem.
I'll use a new store each time I need to update the grid.
Thanks
Did
comment:3 Changed 9 years ago by
Replying to Evan:
You will need to use grid.setStore() to update the store, adding following line to the test case makes it work well:
...... reloadableStore1.close(); dijit.byId('grid').setStore(reloadableStore1);//new line, grid needs an id
I've used this way to update data in the grid (because the way in my test case is not working). I originally tried to do this way, because ComboBox is working like this and because I read in the reference documentation this sentence :
' Since DataGrid is “DataStoreAware”, changes made to the store will be reflected automatically in the DataGrid '
in http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html#dojox-grid-datagrid
In fact, it's only true for newItem & deleteItem.
I'll use a new store each time I need to update the grid.
Thanks
Did
You will need to use grid.setStore() to update the store, adding following line to the test case makes it work well: