Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Databases Also see the forum ASP Databases for more general discussions of ASP database issues not directly related to these books.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Databases 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 February 21st, 2005, 03:56 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default Problem in Paging

hi! friends i have a problem in dataGrid ...
iam having a drop down list which in populated with book categories and the data grid on webform1.aspx (the datagird is paged)...

if i page forward the grid ...and then i select the category from the dropdown list the error encounters which is

" Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. "

please help



ashfaq
__________________
Baby Prgrammer
 
Old February 23rd, 2005, 11:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Whenever you rebind to the datagrid to a different data source, make sure the CurrentPageIndex property of the datagrid is reset to 0. Because you can navigate high in the paging (say for example page 8), then rebind to a source that only has 2 pages worth of data. It's trying to go to page 8 when there isn't any page 8 for this new source of data.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Paging Problem [email protected] PHP Databases 1 November 25th, 2006 02:25 AM
allow paging problem harshwardhan_kulkarni ASP.NET 1.0 and 1.1 Basics 0 November 2nd, 2006 10:29 AM
DataGrid Paging Problem hoailing22 ASP.NET 1.0 and 1.1 Basics 5 April 23rd, 2006 03:15 AM
Problem with recordset paging Stefania Classic ASP Databases 0 February 11th, 2005 08:59 AM
Problem with my paging... fung Classic ASP Databases 2 August 23rd, 2004 07:43 AM





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