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

  • 相关阅读:
    phpstudy apache无法启动的解决办法
    Windows server 2008 快速搭建域环境
    使用netsh来进行端口转发
    基于docker构建测试环境
    [Leetcode] Linked List Cycle
    Hyper-V下安装Ossim系统
    Windows应用替代方案接龙
    图解CISCO 3550忘记密码解决方法
    硬件代理解决用户上网问题
    图->存储结构->数组表示法(邻接矩阵)
  • 原文地址:https://www.cnblogs.com/dreamzcy/p/3164442.html
Copyright © 2011-2022 走看看