extjs data store load data on fly
- by CKeven
I'm trying to create a data store that will load the data schema and records on fly. Here is the current code i have and I'm not sure how to setup the array reader properly since i don't have the schema before query returns.
ds = new Ext.data.Store({
url: 'http://10.10.97.83/cgi-bin/cgiip.exe/WService=wsdev/majax/jsbrdgx.p',
baseParams: {
cr: Ext.util.JSON.encode(omgtobxParms)
},
reader: new Ext.data.ArrayReader({
//root:data.value.records
}, col_names)
});
{"name": "tmp_buy_book",
"schema": [
{ "name": "a", "type": "C"},
{ "name": "b", "type": "C"}
"records": [["1", ""],
["1",""]]}