.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Please help me in a task

Posted By: sankar     Posted Date: September 07, 2008    Points:2   Category :ASP.Net
Hi to every body

I have one task plz let me know the solution for that.


I have more than 10000 records in my database table.
In a web page i have to display the records in the datagrid/gridview.
I have enabled allowpaging, pagesize=25.

the issue is when ever the user clicks on next Page link in pager control,the user has to get the next 25 records that too with in the 3 seconds(this is the company standard).

How can i achieve this task.

plz help me any one.....................

providing code helps me a lot.



thank you........................................

Responses
Author: Amit Mehra             
Posted Date: September 07, 2008     Points: 5   

Hi,
Use custom pagination means you pass the the current page no and add by 25 to get nect 25. for coding refer this link and other details

http://www.codeproject.com/KB/aspnet/GridViewNeatPaging.aspx

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Mohan Raut             
Posted Date: September 08, 2008     Points: 5   

Hi,
u can use as below may help u...
<asp:GridView
DataSourceID="SqlDataSourceGrdView" onpageindexchanging="GrdView_PageIndexChanging"
with other required properties...

and use sqldatasource
<asp:SqlDataSource ID="SqlDataSourceGrdView" runat="server" ConnectionString="<%$ ConnectionStrings:anyConnectionString %>"
SelectCommand="sp_GetDataAll" SelectCommandType="StoredProcedure" > </asp:SqlDataSource>

and in code behind....use
protected void GrdView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GrdView.PageIndex = e.NewPageIndex;
BindGrdView();
}

Author: sriram             
Posted Date: November 23, 2009     Points: 5   

hi sankar,
plz go through this following link

D:\dotnetInterviewPreparation\CustomPagingofGrid\ASP_NET_4GuysFromRolla_com Custom Paging in ASP_NET 2_0 with SQL Server 2005.htm



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend