zoukankan      html  css  js  c++  java
  • GridView中使用分页控件

    前台:导入<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

    引用:<div class="pages">
                 <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15"
                         onpagechanged="AspNetPager1_PageChanged"
                     CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条"
                     FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"
                     ShowCustomInfoSection="Left">
                         </webdiyer:AspNetPager>
            </div>

    可以自定义样式

    后台:调用及绑定

     public void BandRuleFlow() {

            DataSet ds = OPA_RuleFlow.GetAllRuleFlowList(opa_ruleflow);
            count = ds.Tables[0].Rows.Count;
            PagedDataSource pds = new PagedDataSource();
            pds.AllowPaging = true;
            pds.DataSource = ds.Tables[0].DefaultView;
            pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
            AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
            pds.PageSize = AspNetPager1.PageSize;
            this.RepeaterRuleFlow.DataSource = pds;
            this.RepeaterRuleFlow.DataBind();
        
        }

  • 相关阅读:
    hd CPU
    OS + Linux Interview
    db db2 v8.2
    project ERP_SAP R3 / SAP ECC / mySap
    命名空间和模块化编程3 C++快速入门41
    链接和作用域 C++快速入门42
    对象观察器(Object Inspector)
    Delphi7的窗体设计器
    对象观察器(Object Inspector)
    链接和作用域 C++快速入门42
  • 原文地址:https://www.cnblogs.com/dreamzcy/p/3164442.html
Copyright © 2011-2022 走看看