benny
18 Aug 2009, 7:47 AM
Hi,
Does anyone know the best way to generate a new datastore on the fly from an existing one?
Example: I have a datastore with say 10 records. I want to pass only one record into a chart object, so need to generate the datastore first.
Image these records:
2001 a b c
2002 v b n
2004 g h k
Now I want to generate a datastore (or simple array) for the row starting 2001,(i.e. I want only [a,b,c]). What would be the best way to access this data?
for clarity, this is my datastore:
storeA = new Ext.data.Store({
proxy: proxyA,
listeners: {load: storeLoaded},
reader: new Ext.data.JsonReader({
root:"records",
totalProperty: 'totalCount',
id:"year"
},
[ {name: 'year'},
{name: 'fone'},
{name: 'ftwo'},
{name: 'fthree'}
]
)
});
many thanks guys
Does anyone know the best way to generate a new datastore on the fly from an existing one?
Example: I have a datastore with say 10 records. I want to pass only one record into a chart object, so need to generate the datastore first.
Image these records:
2001 a b c
2002 v b n
2004 g h k
Now I want to generate a datastore (or simple array) for the row starting 2001,(i.e. I want only [a,b,c]). What would be the best way to access this data?
for clarity, this is my datastore:
storeA = new Ext.data.Store({
proxy: proxyA,
listeners: {load: storeLoaded},
reader: new Ext.data.JsonReader({
root:"records",
totalProperty: 'totalCount',
id:"year"
},
[ {name: 'year'},
{name: 'fone'},
{name: 'ftwo'},
{name: 'fthree'}
]
)
});
many thanks guys