Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 11th, 2007, 08:00 PM
Authorized User
Join Date: May 2007
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default Pagging

Could someone please tell me when we use the automatic paging property of GridView. so if the pagging is set to 5 records per page then if i select on the link for the next page then will the datasource retrieve all the records from the database or it will only retrieve the decired record it is going to display(6-10).

Old October 12th, 2007, 03:22 AM
Friend of Wrox
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post

well when we bind the gridview with datasource, it takes all values when you will click next it shows next five record of already fetched data.

Old October 17th, 2007, 07:04 AM
Friend of Wrox
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla


You can use PageIndexChanging event in the gridview.
Set the PageIndex of the GridView.

protected void gvGridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
     gvGridView1.PageIndex = e.NewPageIndex;
     gvGridView1.DataSource = datasource;

nalaka hewage

Similar Threads
Thread Thread Starter Forum Replies Last Post
how pagging can be done in jsp kirtesh4u JSP Basics 1 May 29th, 2007 04:54 AM
pagging in asp.net datagrid imjigu General .NET 1 December 17th, 2004 03:14 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.