我在前台用这种方式加载store但是不知道为什么不弹出数据,哪位高手指点下小弟啊?
Ext.onReady(function(){
var _store=new Ext.data.JsonStore({
url:'mygrid.jsp',
//data:[{name:'maomao',age:23,sex:'man'},{name:'nana',age:24,sex:'feman'}],
fields:['name','age','sex']
});
_store.on('load',function(_store){
alert(_store.getCount());
alert(Ext.util.JSON.encode(_store.getAt(0).data));
});
_store.load();
});
传如的json格式为:[{name:'maomao',age:23,sex:'man'},{name:'nana',age:24,sex:'feman'}]