在gridview中加载部分数据 [英] Load data in gridview in parts
本文介绍了在gridview中加载部分数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何在网格中加载数据。喜欢ex: - 我在表中有成千上万的记录,我想默认显示前100个然后按一下按钮我想加载下一个100依旧等循环继续。我不想每次都打到数据库时间我点击按钮。它应该很快。任何想法?
任何帮助将不胜感激..
在此先感谢.. 。
How can we load data in grid in parts. Like for ex:- i have thousands of records in table and i want to show the first 100 by default then on a button click i want to load the next 100 and so on and the cycle continues.I dont want to hit the database every time i click the button.It should be fast.Any ideas?
Any help would be appreciated..
Thanks in advance...
推荐答案
你应该实现分页。
我的下一篇文章可以帮到你:高级ASPX GridView分页和数据实体 [ ^ ]
You should implement pagination.
My next article could help you: Advanced ASPX GridView Pagination and Data Entities[^]
尝试sql pagging in Gridview。
并在谷歌搜索关于那个有数千个结果.. :)
使用SQL Server存储过程在ASP.Net GridView中自定义分页 [ ^ ]
使用gridview中的存储过程在asp.net中自定义分页 [ ^ ]
使用ASP.NET 4.5中的GridView进行自定义分页 [ ^ ]
使用ASP.NET GridView控件进行高效的服务器端分页 [ ^ ]
如何在asp.net Gridview控件中实现分页和排序? [ ^ ]
使用ASP.NET GridView进行自定义分页 [ ^ ]
使用C#和ASP.NET中的GridView进行LINQ to SQL分页3.5 [ ^ ]
Try sql pagging in Gridview.
and search in google regarding that there are thousands of results regarding that.. :)
Custom Paging in ASP.Net GridView using SQL Server Stored Procedure[^]
Custom paging in asp.net using stored procedure in gridview[^]
Custom Paging With GridView in ASP.NET 4.5[^]
Efficient Server Side Paging with the ASP.NET GridView Control[^]
How to implement paging and sorting in asp.net Gridview control?[^]
Custom paging with ASP.NET GridView[^]
LINQ to SQL Paging using GridView in C# and ASP.NET 3.5[^]
设置GridView属性
AllowPaging = true,
Pagesize = 100 >
活动
OnPageIndexChanging = GridView1_PageIndexChanging;
Set GridView Properties
AllowPaging=true,
Pagesize=100
Event
OnPageIndexChanging=GridView1_PageIndexChanging;
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
loadgrid();
}
这篇关于在gridview中加载部分数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文