Ext4.2 查询后选择第一页

阅读更多

 

给store设置currentPage属性就可以,

stoOrganization.currentPage=1;

stoOrganization.load({params: { start: 0, limit: pagesize_combo.getValue() }});

或者使用loadPage方法指定page

stoOrganization.loadPage(1,{params: { start: 0, limit: pagesize_combo.getValue() }});

 

//查询
function getPageList(pageIndex){
	if(typeof(pageIndex) == "undefined"){
		pageIndex = 1;
	}
	//stoOrganization.currentPage=1; //解决查询后分页栏(pagingtoolbar)显示的不是第一页的问题
	stoOrganization.pageSize = pagesize_combo.getValue();
	//stoOrganization.load({params: { start: 0, limit: pagesize_combo.getValue() }});
	stoOrganization.loadPage(pageIndex,{params: { start: (pageIndex-1)*stoOrganization.pageSize, limit: pagesize_combo.getValue()}});
}

 

你可能感兴趣的:(Ext,grid,store,第一页)