分页控件

Posted 7q4w1e

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了分页控件相关的知识,希望对你有一定的参考价值。

模板

模板1:天地 - 地图右侧小分页控件

//html

<div dojoType="bootstrap.layout.Pagination" showPageSize=0  pageSize="20" pageModel="20"  dojoAttachPoint="wfrmPage"></div>

//Js

//查询之后,给分页控件赋值

var pageItem = {};

pageItem.pageAllSize = json.count;

pageItem.pageNum = this.currentPage;

pageItem.pageSize = this.pageSize;

this.wfrmPage.onRefreshPage(pageItem);

//绑定点击方法

this.connects.push(dojo.connect(this.wfrmPage, "onClick", this, dojo.hitch(this,this.onClick_btnPage)));

//分页

onClick_btnPage:function(paginator){

     this.currentPage = paginator.pageNum;

     this.pageSize = paginator.pageSize;

     if (paginator.blChange){

         this.switchPageQuery();

     }

},

//分页回调

switchPageQuery: function(){

   this.getParameters();//获取页面数据

   this.onClick_btnQuery(content);//查询

},

 

模板2:TD - PPIS - 分页

//html

<!-- 分页 -->

<div class="row">

<div class="col-xs-12 text-right">

<div dojoType="bootstrap.layout.Pagination" dojoAttachPoint="wfrmPage"></div>

</div>

</div>

//js

//分页

this.connects.push(dojo.connect(this.wfrmPage, "onClick", this, dojo.hitch(this,this.onClick_btnPage)));

//分页

onClick_btnPage:function(paginator){

        this.queryCondition.currentPage = paginator.pageNum;

        this.queryCondition.pageSize = paginator.pageSize;

         if (paginator.blChange){

            this.gridCostCount.selection.deselectAll();

        this.pagingQuery();// 分页查询数据

        }

},

//查询方法中

var pageItem = {};

pageItem.pageAllSize = json.count;

pageItem.pageNum = this.queryCondition.currentPage;

pageItem.pageSize = this.queryCondition.pageSize;

this.wfrmPage.onRefreshPage(pageItem);

//公共变量赋值

queryCondition: {//初始化查询值

needPage: true,

needCount: true,

currentPage: 1,

pageSize: 20

},

// 分页查询数据

pagingQuery:function(){

if(!this.verify_queryParam()){

this.btnQuery.cancel();

return;

}

this.queryCondition.id = this.assetIds;

this.queryAssetList(this.queryCondition);

},

//查询

onClick_btnQuery: function(){

this.queryCondition.currentPage = 1;// 页码

this.pagingQuery();// 分页查询

},

//后台

start = (queryParam.getCurrentPage() - 1) * queryParam.getPageSize() + 1;

end = start - 1 + queryParam.getPageSize();

以上是关于分页控件的主要内容,如果未能解决你的问题,请参考以下文章

.NET Winform 自定义分页控件如何在父窗体中调用?

nodejs -数据分页ejs-分页控件

分页控件

C# - 杨涛分页控件AspNetPager sql分页篇

jqgrid分页控件

[转]Oracle分页之二:自定义web分页控件的封装