首页 新闻 会员 周边 捐助

extjs 分页的问题,麻烦大侠们进来看看。

0
悬赏园豆:10 [已关闭问题] 关闭于 2011-11-30 13:44

我数据库里面查询到的是600多条数据,然后返回DataTableToJson格式是:

{"totalCount":677,"items":[{"ID":"00f3b49b-7396-441c-9ef6-7e58a9ec4d09","TYPEID":"2","CARD":"436742121549428911311","BANK":"f6acb4fc-dd75-4d6e-bdcf-c5fce335a913","EXWD":"49c25763-0780-417c-97c7-11f57912a5dc","LXMC":"人员","BANKMC":"建行金支行","EXWDMC":"","COMPANY":"","BANKNAME":"","AREACODE":"","AREANAME":""},{"ID":"00f3b49b-7396-441c-9ef6-7e58a9ec4d09","TYPEID":"2","CARD":"436742121549428911311","BANK":"f6acb4fc-dd75-4d6e-bdcf-c5fce335a913","EXWD":"49c25763-0780-417c-97c7-11f57912a5dc","LXMC":"人员","BANKMC":"建行金支行","EXWDMC":"","COMPANY":"","BANKNAME":"","AREACODE":"","AREANAME":""}]}

这样的。

js获取json:

var store = new Ext.data.Store({
    proxy: new Ext.data.HttpProxy({
        url: "ajax/Bank/SearchBankCardList.ashx"
    }),
    reader: new Ext.data.JsonReader(
        {totalProperty: "totalCount", root: "items"},
        [{name:"ID"},{name:"TYPEID"},{name:"CARD"},{name:"BANKMC"},{name:"LXMC"},{name:"BANK"},{name:"EXWD"},{name:"EXWDMC"},{name:"COMPANY"}
        ,{name:"BANKNAME"},{name:"AREACODE"},{name:"AREANAME"}]
    ),
    listeners: {loadexception: function(){
            error("数据加载错误,请稍候重试...");
        }, load: function(s,records){}
    }
});这样来获取json的,不知道我这格式对不对。总数是600多条我的页面上显示的(当前记录数:1-3 总记录数:3)而且上一页和下一页也不能按显示是灰色的无法翻页,如下图:

茹儿的主页 茹儿 | 菜鸟二级 | 园豆:203
提问于:2011-11-30 12:19
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册