PDA

View Full Version : problem in grid store load



rahulmehta
23 Jun 2010, 3:16 AM
hii

i have a extjs grid which is loaded by on store and i want on clicking a button i want to load the same grid with differenet store but it is not getting done .

grid.store=SimpleDataStore1
SimpleDataStore1.load();
grid.getStore().load();

i have used these three lines to store the new store in grid.store and then load it and then reload the grid ,

what is the mistake in this code please tell me .

regards

rahul

Condor
23 Jun 2010, 3:40 AM
Why a different store? Can't you load the same store with different data?

ps. If you really must change the store then use grid.bindStore(newStore).

rahulmehta
23 Jun 2010, 3:52 AM
Why a different store? Can't you load the same store with different data?

ps. If you really must change the store then use grid.bindStore(newStore).

hii condor,
thanks for reply.
m getting this error on using bindstore , and i want different store to have different data with from different url in my store .
grid.bindStore is not a function
grid.bindStore(SimpleDataStore1);

regards

rahul

Condor
23 Jun 2010, 3:56 AM
Sorry, GridPanel doesn't have a 'bindStore' method. Use:

grid.reconfigure(newStore, grid.getColumnModel());

rahulmehta
23 Jun 2010, 3:59 AM
cool condor thanks for reply and be there ..

regards

rahul