实在没办法了ext grid不显示数据啊
var store = Ext.create('Ext.data.Store', {
model:'Task',
proxy : new Ext.data.HttpProxy({
url : 'detail_qurey.asp?projectid='+projectid, //说明后台的serverlet
method : 'POST'
}),
reader : new Ext.data.JsonReader({
root : "rows",
totalProperty : 'total',
id: 'itemid'
},Task), //说明数据结构
sortInfo : {property: 'itemid', direction: 'ASC'},
groupField: 'bigitem'
});
store.load({
scope : store ,
callback: function(records, operation, success) {
if (success) {
alert(records.length);
}
}
});
我不知道为什么不显示数据,alert(records.length)为1,在firebug里面查看json是有的啊
{"rows":[{"itemid":1,"itemname":"\u5730\u9762","bigitem":"\u53A8\u623F","unitprice":"20","unit":null,"size":"100","price":null,"content":null}],"total":1}
但是 alert(records[0].get('itemname'));为空 。始终没数据显示的,哪位哥有经验求教啊,谢谢了,分不多