protected void lnkbtnFrist_Click(object sender, EventArgs e)
{
//首页
this.GridView_username.PageIndex = ;
this.ReadData();
}
protected void lnkbtnPre_Click(object sender, EventArgs e)
{
//上一页
if (this.GridView_username.PageIndex > )
{
this.GridView_username.PageIndex = this.GridView_username.PageIndex - ;
this.ReadData();
}
}
protected void lnkbtnNext_Click(object sender, EventArgs e)
{
//下一页
if (this.GridView_username.PageIndex < this.GridView_username.PageCount)
{
this.GridView_username.PageIndex = this.GridView_username.PageIndex + ;
this.ReadData();
}
}
protected void lnkbtnLast_Click(object sender, EventArgs e)
{
//最后一页
this.GridView_username.PageIndex = this.GridView_username.PageCount;
this.ReadData();
}
//选择所需要的页数
protected void ddlCurrentPage_SelectedIndexChanged(object sender, EventArgs e)
{
this.GridView_username.PageIndex = this.ddlCurrentPage.SelectedIndex;
this.ReadData();
}

gridview分页的更多相关文章

  1. asp.net gridview 分页显示不出来的问题

    使用gridview分页显示,在点击第二页的时候显示空白,无数据. 原因是页面刷新,绑定datatable未执行 解决方法: 1.将datatable设置为静态 2.在OnPageIndexChang ...

  2. Android GridView 分页加载数据

    android UI 往右滑动,滑动到最后一页就自动加载数据并显示 如图: package cn.anycall.ju; import java.util.ArrayList; import java ...

  3. GridView 分页方法

    要实现GrdView分页的功能. 操作如下: 1.更改GrdView控件的AllowPaging属性为true. 2.更改GrdView控件的PageSize属性为 任意数值(默认为10) 3.更改G ...

  4. GridView分页排序

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridviewPage.asp ...

  5. GridView分页的实现

    要在GridView中加入 //实现分页 AllowPaging="true" //一页数据10行 PageSize="10" // 分页时触发的事件 OnPa ...

  6. GridView分页功能的实现

    当GridView中显示的记录很多的时候,可以通过GridView的分页功能来分页显示这些记录.如果GridView是直接绑定数据库,则很简单:将"启动分页"打勾即可. 如果是用代 ...

  7. GridView分页的实现 ASP.NET c#(转)特好用

    要在GridView中加入 //实现分页 AllowPaging="true" //一页数据10行 PageSize="10" // 分页时触发的事件OnPag ...

  8. 自己写的一个ASP.NET服务器控件Repeater和GridView分页类

    不墨迹,直接上代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; usin ...

  9. GridView分页操作

    1.html <PagerStyle HorizontalAlign="Center" /> <PagerTemplate> 第: <asp:Labe ...

随机推荐

  1. jmeter与apache测试网站并发

    本文主要介绍性能测试中的常用工具jmeter的使用方式,以方便开发人员在自测过程中就能自己动手对系统进行自动压测和模拟用户操作访问请求.最后还用linux下的压测工具ab做了简单对比. 1.      ...

  2. oracle高效分页存储过程(百万数据级)

    create or replace procedure Pager( page in number,--数据页数,从1开始 pageSize in number,--每页大小 tableName nv ...

  3. sprinng in action 第四版第六章中的ValidationMessages.properties不起作用

    文件名必须是ValidationMessages.properties,必须放在类的根目录下

  4. P2P网贷中的4种理财业务模式

     线上3种   直投标:线上理财人直接购买借款人的标,平台只是起个"撮合"作用,收点借款人的服务费.           借款人不还钱,有的平台会帮"借款人"还 ...

  5. HDU1392:Surround the Trees(凸包问题)

    Surround the Trees Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Other ...

  6. 前端项目课程3 jquery1.8.3到1.11.1有了哪些新改变

    web项目课程3  jquery1.8.3到1.11.1有了哪些新改变 一.总结 一句话总结:领会官方升级的意思.  1.live();    2.die();    3.bind();    4.u ...

  7. android获取一个用于打开Word文件的intent

    近期在做项目使用webview显示后,有写文档须要打开,找了一些资料,研究了一下,弄出来了! 以下贴一下主要代码: param为文档的主要路径 public static Intent getWord ...

  8. js进阶 12-1 jquery的鼠标事件有哪些

    js进阶 12-1 jquery的鼠标事件有哪些 一.总结 一句话总结:1+3*2+1+1,其中里面有两组移入移出,一组和click,总结就是click(3个),hover(5个),mousemove ...

  9. valgrind,arm-linux交叉编译

    1. 下载及解压valgrind-3.9.0 2.CC=/opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm-hisiv200-linux ...

  10. IHookHelper的用法

    1.实例化IHookHelper 对象: IHookHelper m_hookHelper = new HookHelperClass();  m_hookHelper.Hook = this.axM ...