当前位置: 代码迷 >> Ajax >> Ext3.1版本 GRID 列表的store接受不到json格式的数据!解决方案
  详细解决方案

Ext3.1版本 GRID 列表的store接受不到json格式的数据!解决方案

热度:618   发布时间:2012-12-31 11:57:51.0
Ext3.1版本 GRID 列表的store接受不到json格式的数据!
rt   郁闷  store 在接收json格式数据之后传进来的值没有进到store的data里面去 而是进到store的json里面去了 求大能帮助 , 如下代码:

     var cm=new Ext.grid.ColumnModel([
        { header: "ID",dataIndex:"ID",width:'100px'},
        { header: "用户ID",dataIndex:"USERID",width:'100px',hidden:true},
        { header: "用户",dataIndex:"USERNAME",width:'200px'},
        { header: "密码",dataIndex:"PASSWORD",width:'100px',hidden:true},
        { header: "公司ID",dataIndex:"COMPANYID",width:'100px',hidden:true},
        { header: "公司",dataIndex:"COMPANYNAME",width:'100px'},
        { header: "分组ID",dataIndex:"GROUPID",width:'100px',hidden:true},
        { header: "分组",dataIndex:"GROUPNAME",width:'100px'},
        { header: "职位角色ID",dataIndex:"ROLEID",width:'100px',hidden:true},
        { header: "职位角色",dataIndex:"ROLENAME",width:'100px'},
        { header: "工作职位",dataIndex:"DEPART",width:'100px'},
        { header: "备用",dataIndex:"IMEI",width:'100px'},
        { header: "手机",dataIndex:"MOB",width:'100px'},
        { header: "注册状态",dataIndex:"REGSTATUS",width:'100px',hidden:true},
        { header: "注册日期",dataIndex:"REGDATE",width:'100px'},
        { header: "电子邮件",dataIndex:"EMAIL",width:'100px'},
        { header: "备用",dataIndex:"UTYPE",width:'100px',hidden:true},
        { header: "创建人",dataIndex:"CREATER",width:'100px'},
        { header: "创建日期",dataIndex:"CREATEDATE",width:'100px'},
        { header: "性别",dataIndex:"SEX",width:'100px'},
        { header: "行政代码",dataIndex:"QU",width:'100px'},
        { header: "公司代码",dataIndex:"COMPANYCODE",width:'100px'}
     ]);

   var store = new Ext.data.Store({
       reader : new Ext.data.ArrayReader({},[
        {name:'ID'},
        {name:'USERID'},
        {name:'USERNAME'},
        {name:'PASSWORD'},
        {name:'COMPANYID'},
        {name:'COMPANYNAME'},
        {name:'GROUPID'},
        {name:'GROUPNAME'},
        {name:'ROLEID'},
        {name:'ROLENAME'},
        {name:'DEPART'},
        {name:'IMEI'},
        {name:'MOB'},
        {name:'REGSTATUS'},
        {name:'REGDATE'},
  相关解决方案