Ext.PagingToolbar

bbar:new Ext.PagingToolbar({
store:menuJsonStore,        //数据源
        pageSize:10,
        displayInfo:true,   //为true时下面的才显示
        displayMsg:'第{0}条到{1}条记录,一共{2}条',
        emptyMsg:'没有记录',
        afterPageText: "页,共{0}页",
        beforePageText: "当前是第"
    })
//增加需要传递的参数
menuJsonStore.on("beforeload",function(){
menuJsonStore.baseParams={"mainKind":searchForm.getForm().findField("mainKind").getValue(),"subKind":searchForm.getForm().findField("subKind").getValue(),"menuId":searchForm.getForm().findField("menuId").getValue()};
});
menuJsonStore.load({params:{start:0,limit:10}});//start开始查询位置,从第几行开始,而非第几页, limit一页要查询多少条

你可能感兴趣的:(ext)