PDA

View Full Version : Build String from Grid/Store



davisty
25 Aug 2011, 4:35 AM
Hello,

Im trying to build a string of json data to be submitted in a url. It's a mapquest api

Im using an Ext.each method to iterate through the store.


Ext.each(gridStore, function(eachItem) {
record = "\'" + gridStore.get("OHADR1") ... yadayadayada
});

But that obviously wont work ...

How do I access data items in the store that will be inserted into the string. This seem to escape me ...

"When all is said and done, more will be said than done ..."

davisty
25 Aug 2011, 8:29 AM
I wonder why I even bother posting to this forum.

I rarely get any back

shuixiya1999
26 Aug 2011, 12:51 AM
var mystr = "";
Ext.each(gridStore, function(item){
mystr += item.get('something');
})

alert(mystr);


try it!