PDA

View Full Version : Grid Data Store



tomalex0
9 Oct 2009, 8:55 PM
Hi,

I have grid data store which fetches value from php page, whenever i load store the grid content is removed first and loaded again.

Is there any option so that , the current values in grid are not removed when the load is called.

I dont want to show an empty grid when grid store is loaded

jarlau
9 Oct 2009, 10:39 PM
use http://www.extjs.com/deploy/dev/docs/?class=Ext.data.Store&member=load with "add: true" option.

tomalex0
10 Oct 2009, 1:02 AM
this.grid.store.load({
params:{
'name':nameurl
},add:true
});


is the above mentioned code is correct to add the store values rather than replacing??
it doesn't worked for me

tomalex0
19 Jan 2010, 2:24 AM
Can anyone help me with this,

I dont want to empty the grid content when the store is load,

i ahve trie add :true in load but its not working so.

flanders
19 Jan 2010, 4:27 AM
Can you post you're code? How and when do you populate the store?

tomalex0
19 Jan 2010, 8:40 PM
im loading grid store when i press submit button, i dont want 2 load the grid by emptying it and fetching it, i want as if new datas are added to the grid


this.grid.store.load({
params:{
'name':nameurl
},add:true
});

tomalex0
20 Jan 2010, 1:05 AM
I used to create grid store in submit and then load it.
I have changed it now, store is created along with grid and in submit function the store is only loaded

add:true in load will create repeated entries

flanders
20 Jan 2010, 2:31 PM
Are you setting your idProperty right on the store/reader? If you provide records with an id, which is already in the store it should override the old record.