实在没办法了ext grid不显示数据啊

ma1986 ma1986 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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'));为空 。始终没数据显示的,哪位哥有经验求教啊,谢谢了,分不多
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
ma1986
JavaScript 87,983 成员 224,681 内容