ASP.NET中的特定GridView分页 [英] Specific GridView Paging in ASP.NET

查看:102
本文介绍了ASP.NET中的特定GridView分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好好友的
在我的asp.net应用程序中,我必须获取"GrideView"控件
SQL数据库中的记录并填充grideview.我已经完成了该任务.但是为了使最终用户更方便,我不得不在其中引入Pagging.因此我在Google上进行了很多搜索
但是我找不到简单的源代码来做到这一点.

例如,假设我的datable中有65条记录,而我的pagesize中有15条记录,那么第一次尝试时,它将在页面索引1上显示1到15条记录.但是当我想处理时
页面索引更改事件,那么我需要在pageindex 2上显示16到30条记录,对于页面索引3则显示31到45条记录,依此类推.....

因此,我该如何高效地实现代码在C#中呢?

所以有人可以帮我...... ????

在此先感谢
Yogesh

Hello Buddy''s
In my asp.net application am having "GrideView" control for which i have to fetch
the records from SQL database and fill the grideview.That task i had done.But now for end user conviniance i have to introduce pagging in that.So i google it a lot
but i could not found simple sorce code to do that.

Ex.Suppose am having 65 records in my datable and my pagesize in 15 so at first attempt it will show me 1 to 15 records on page index 1.But when i want to handle
page index change event then i need to show 16 to 30 records on pageindex 2,and for page index 3, 31 to 45 and so on.....

So how can i accomplish that with efficiancy my code is in C#.

So can somebody help me ......????

Thanks in Advance
Yogesh

推荐答案

然后,您对Google的搜索并没有太努力...

在此站点上:显示页面一次在GridView中查看信息 [
You didn''t google too hard then...

From this very site: Showing a page of information at a time in a GridView[^]


我认为您想在网格视图中实现分页,不是吗,如果是,请参考以下内容,这些信息对您有帮助:
在ASP.NET中使用GridView控件进行有效分页 [使用C#在ASP.Net中对Gridview,DataGrid,DataList和Repeater控件进行自定义分页 [ ^ ]
i think you want to implemetn paging in grid view , isn''t it , if yes then refer the following , these migth help you :
Effective Paging with GridView Control in ASP.NET[^]
Custom paging for Gridview, DataGrid, DataList and Repeater Control in ASP.Net with C#[^]


尝试
GridView自定义分页 [
Try
GridView Custom Paging[^]


这篇关于ASP.NET中的特定GridView分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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