Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

grid_and_store_issue.html (3.5 KB) - added by dtresse 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by dtresse

Attachment: grid_and_store_issue.html added

comment:1 Changed 8 years ago by Evan

Milestone: tbd1.8
Resolution: invalid
Status: newclosed

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

comment:2 Changed 8 years ago by dtresse

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 in reply to:  1 Changed 8 years ago by dtresse

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

Note: See TracTickets for help on using tickets.