可以显示数据 和页数
但是点击下一页 翻页的时候 数据没有更新????

解决方案 »

  1.   

        var pageSize = 12;
        var PublishFields = ["jydbh", "sxhh", "tyfs", "jydzt", "sfsh", "thfs", "zyfs", "qdgl", "sdzbm", "dzzbm", "sdzmc", "zdzmc", "inDate", "jhrq", "zcyf", "zbxe", "fhrbm", "fhrxm", "fhrdh", "fhrdz", "shrbm", "shrxm", "shrdh", "shrdz", "yhr", "zdr", "skr", "qkr", "other", "hwmc", "hwzjs", "hwztj", "hwzzl", "hwyf", "bxe", "bxf", "hwhk", "jhf", "hwzyf"];    jydhwdInfoStore = new Ext.data.GroupingStore({
            proxy: new Ext.data.HttpProxy(
               {
                   url: "DATA/jydbh/jydhwxx.aspx",
                   method: "POST"
               }),
            reader: new Ext.data.JsonReader(
               {
                   fields: PublishFields,
                   root: "data",
                   id: "jydbh",
                   totalProperty: "totalCount"           }),
            groupField: 'inDate',
            sortInfo: { field: 'inDate', direction: "DESC" }
        });
        jydhwdInfoStore.load({ params: {start:0,limit:pageSize} });----------------------------------------------------------------------
       var Publishgrid = new Ext.grid.GridPanel({
            id: "EditJydxxGrid",
            store: jydhwdInfoStore,
            sm: sm,
            cm: cm,
            loadMask: true,
            stripeRows: true,
            autoScroll: true,
            border: false,
            view: new Ext.grid.GroupingView({
                sortAscText: '正序排列',
                sortDescText: '倒序排列',
                columnsText: '列显示/隐藏',
                groupByText: '根据本列分组',
                showGroupsText: '是否采用分组显示',
                groupTextTpl: '{text} (<font color=red><b>{[values.rs.length]}</b></font> {[values.rs.length > 0 ? "条交易记录" : "暂无交易记录"]})'
            }),
            bbar: new Ext.PagingToolbar({
                store: jydhwdInfoStore,
                pageSize: pageSize,
                displayInfo: true,
                displayMsg: '当前记录 {0} -- {1} 条 共 {2} 条记录',
                emptyMsg: "No results to display",
                prevText: "上一页",
                nextText: "下一页",
                refreshText: "刷新",
                lastText: "最后页",
                firstText: "第一页",
                beforePageText: "当前页",
                afterPageText: "共{0}页"        }),
      

  2.   

    去找个plugin
    直接用
    bbar: new Ext.PagingToolbar({
                    pageSize: 30,
                    store: store,
                    displayInfo: true,
                    displayMsg: '当前:{0} - {1}, 共: {2}条',
                    emptyMsg: '没有记录',
                    plugins: [new Ext.ux.plugin.PageSizeCombo(), new Ext.ux.ProgressBarPager({ defaultText: '加载中...' })]
                })
      

  3.   

    你确定load方法在grid渲染之后?