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();
        
        }

  • 相关阅读:
    突破
    leetcode刷题 538~
    leetcode刷题 519~
    Docker练习之镜像更新方法1
    十二 Linux之tar解压缩
    十一 Linux软件包管理yum
    十 Linux指令之grep
    九 linux指令之find
    八 Linux ps指令查看进程和kill杀进程
    七 Linux top命令
  • 原文地址:https://www.cnblogs.com/dreamzcy/p/3164442.html
Copyright © 2011-2022 走看看