Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 September 16th, 2012, 07:06 AM
Authorized User
 
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to allow paging in grid view ?

Hi
I have one gridview to fetch data from database.
I would like add paging feature in it but when i click
on page number error ocurrs. The c# code is below


Please click link for error details....


http://abhishekkumar.net/erro.pdf



<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None" AllowPaging="True">
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="URL" DataTextField="Mem_ID"
Target="_blank" />
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>





Pls help me.

Last edited by Abhishek Kumar; September 16th, 2012 at 07:52 AM.. Reason: Spelling Mistake
 
Old December 15th, 2012, 07:17 AM
Registered User
 
Join Date: Dec 2012
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to allow paging in grid view

this mathod for For allow paging in grid view...
select gridview ->goto properties window ->click on events button

double click on pageindexchanging event

and set

Collapse | Copy Code
Allowpaging=true for gridview
in pageindex changing event write the following code
Collapse | Copy Code
gridview1.pageindex=e.newpageindex;
//gridbindingcode
gridview1.databind();





Similar Threads
Thread Thread Starter Forum Replies Last Post
Paging with grid view sophia ASP.NET 3.5 Basics 8 December 5th, 2009 01:10 PM
Paging Data grid view Prakash001 Visual Basic 2005 Basics 0 February 6th, 2008 04:07 AM
Data Grid View Paging in VB.Net Prakash001 Visual Studio 2005 0 January 30th, 2008 07:44 AM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
Paging numbers at top of Grid rrhandle VB.NET 2002/2003 Basics 0 November 16th, 2005 11:45 AM





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