使用C#在ASP.NET的网格视图中自定义分页 [英] Custom Pagination in Grid view in asp.net using c#

查看:69
本文介绍了使用C#在ASP.NET的网格视图中自定义分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在一个项目中工作,因为我必须使用c#在Grid View中进行自定义分页,它必须看起来像

1 2 3 4 5接下来,当我单击下一步"时,必须显示6 7 8 9 10下一步",然后当我单击下一步"时,必须显示11 12 13 14 15下一步" ..

该怎么做?

谢谢.,

Hi.,

I am working in a project, in that i have to do custom pagination in Grid View using c#, it must look like

1 2 3 4 5 Next when i click Next, 6 7 8 9 10 Next will have to display then when i click Next it has to show 11 12 13 14 15 Next.......

How to do this?

Thanks.,

推荐答案

1)首先确定在一页上显示多少条记录
2)然后计算数据库表中记录的总数..
从TABLENAME中选择COUNT(*)
3)在此基础上计算页面总数(totalRecord/页面行数)
4)并使用databse存储过程根据页面索引选择条件数据
1) First decide how many record will display on one page
2) then calculat the total no of record from the database table..
SELECT COUNT(*) FROM TABLENAME
3) On that base calculate total no of page (totalRecord / page rows)
4) and use databse store procedure select conditional data as per the page index


这篇关于使用C#在ASP.NET的网格视图中自定义分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆