ext中store读值的问题

Mathilna Mathilna 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
store声明:
var jtbcs=new Ext.data.JsonStore({
autoLoad:true,
proxy:new Ext.data.HttpProxy({
method:'GET',
url:'Action/JKDA/grjkda_jktjb.aspx?type=listJtbcs'
}),
reader:new Ext.data.JsonReader({
root:'rows',
totalProperty:'totalCount',
fields: [
{name: 'JCRQ1',mapping:'JCRQ1',type:'date'},//建床日期
{name: 'CCRQ1',mapping:'CCRQ1',type:'date'},//撤床日期
{name: 'YY',mapping:'YY'},//原因
{name: 'YLJGMC',mapping:'YLJGMC'},//医疗机构名称
{name: 'BAH',mapping:'BAH'}//病案号
]
})
});
grid的声明:
var jtbcsgrid = new Ext.grid.EditorGridPanel({
autoEncode:true,
store:jtbcs,
frame:true,
width:600,
height:200,
anchor:'93%',
clicksToEdit:1,
columns: [
{header: "建床日期", width: 100, sortable: true, dataIndex:"JCRQ1",renderer:dateRender, editor:new Ext.grid.GridEditor(new Ext.form.DateField({format:'Y-m-d',allowBlank:true}))},
{header: "撤床日期", width: 100, sortable: true,dataIndex:"CCRQ1",renderer:dateRender,editor:new Ext.grid.GridEditor(new Ext.form.DateField({format:'Y-m-d',allowBlank:true}))},
{header: "原因", width: 150, sortable: true,dataIndex:"YY",editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:true}))},
{header: "医疗机构", width: 150, sortable: true,dataIndex:"YLJGMC",editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:true}))},
{header: "病案号", width: 100, sortable: true,dataIndex:"BAH",editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:true}))}
],
store:jtbcs,
stripeRows: true
});
重载store:
jtbcs.reload({callback:function(){alert(this.getTotalCount())}}); 返回值为0
而事实上,后台已经把值打印出来了,打印的内容为:
{totalCount:2,rows:[{"JCRQ1":"2010-06-16","YLJGMC":"5","JCRQ":"2010-6-16 0:00:00","CCRQ1":"2010-06-12","JTBCS_ID":"52","GRJKDABH":"奥斯丁发生点","CCRQ":"2010-6-12 0:00:00","YY":"4","BAH":"6"},{"JCRQ1":"2010-06-08","YLJGMC":"2","JCRQ":"2010-6-8 0:00:00","CCRQ1":"2010-06-07","JTBCS_ID":"51","GRJKDABH":"奥斯丁发生点","CCRQ":"2010-6-7 0:00:00","YY":"1","BAH":"3"}]}
屏幕上没有显示,请各位高手帮忙看下,有哪一点代码不明确的请提出来。
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
Mathilna
Ajax 52,778 成员 25,334 内容