zoukankan      html  css  js  c++  java
  • GridView,Repeater分页控件:WebPager(开源)

    一、特点:
    可以用在母板、MS Ajax等控件嵌套的任何地方,
    支持GridView,Repeater等数据控件的分页
    二、属性:
    1. PagerStyle: 设置分页样式(NextPrev,NumericPages)
    2. ControlToPaginate: 指定要实现分页的控件ID(
    数据控件本身不需要进行数据绑定了,只需对WebPager进行数据绑定就行了)
    3. PageSize: 获取或设置要在单页上显示的项数
    4. CurrentPageIndex: 获取或设置当前页的索引
    三、事件:
    1. OnPageIndexChanged: 执行分页时触发的分页事件

    四、源码下载

    五、示例: (Repeater用法于此类似)

    <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="true"
        OnRowDataBound
    ="GridView1_RowDataBound" AllowSorting="True" OnSorting="GridView1_Sorting">
        
    <PagerSettings Visible="False" />
    </asp:GridView>
    <cc1:WebPager ID="WebPager1" runat="server" PagerStyle="NextPrev" ControlToPaginate="GridView1"
        PageSize
    ="5" OnPageIndexChanged="WebPager1_PageIndexChanged" />

    Page事件

    Gridview ----------------------------------------------------------


  • 相关阅读:
    实现h5中radio单击取消与选中
    小程序中的组件化理解
    阿里字体css代码引入方法
    前端布局心得小结
    Python学习资源汇总,转载自他人
    史上最全 原生javascript的知识总结,适合新手及查资料用!
    windows Python 3.4.3 安装图文
    PyInstaller编译python3时使用的详细参数介绍
    PyInstaller 安装方法 及简单的编译exe (python3)
    Windows 安装 GTK+ 图文说明
  • 原文地址:https://www.cnblogs.com/wf225/p/936927.html
Copyright © 2011-2022 走看看