Login Register

Refreshing grid, model, datastore ... ?

Hi all,
I'm messed up with all those things !

I have this generated datastore:

This datastore feeds a grid using a model:

var myView = { cells: [[ {name: 'mydata', field: "data"} ]] }; var myLayout = [ myView ]; myGrid.setStructure(myLayout);

I want to refresh the grid when my datasource is changing.
Which is the best way to do it? I've tried many things (myGrid.refresh(), myGrid.render(), myModel.xxx(); myStore.xxx()) none where successful .... any idea ?
thx
data

For that datastore, in

For that datastore, in general, you need to do something similar to:

dataStore = new dojo.data.ItemFileWriteStore({url:'http://localhost:xxx/getDataStore'});
grid.setModel(dataStore);

Try QueryReadStore

Another forum topic from a week ago might help: Refresh grid when underlying data on server changes