This is my JsonStore for grid.
var itemListStore = new Ext.data.JsonStore({
id : 'itemListStore',
proxy : new Ext.data.HttpProxy({
url : 'test.php',
}),
totalCnt : 'totalCnt', // ?
lastUpdate : 'lastUpdate', // ?
root : 'content', // it works ok
fields : [
{name : 'name', type : 'string'},
{name : 'id', type : 'string'},
],
autoLoad: true,
listeners : {
load : function(){
// I need to get the totalCnt and lastUpdate field value
alert(this.lastUpdate); // output : lastUpdate -,.-
}
}
});
and the proxy data comes like this
{“totalCnt”:95,”lastUpdate”:”2011-08-01 09:20:03.000″,”content”:[{“name”:”MURRAY MP220GF………………
I can draw grid with content(root) but I can not get the totalCnt and lastUpdate field in load function.
anybody know this, please help me
Thanks.
You can get it by using:
UPDATE:
replaced
readerwithgetReader()Check out docs