473,385 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

In a data grid when the user clicks the "Next" or "Previous" navigational
links I am getting the above error message.

That happens only in the following scenarios.

1.. I am listing all the search results in the grid.
2.. User clicks the next button. Next set of result will be displayed.
3.. User clicks the hyperlink on the grid cell. Take the user to a
different page.
4.. User clicks the browser back button.
5.. Clicks the "Next" button on the grid.
6.. The above error occurs.
The search result gird has more than 100 pages. What I am saying is the
currentPageIndex I am setting here is with in the range as specified in the
error message.

Why I am getting the above error. How to resolve it?

I am on .Net Framework 1.1.

Thanks,

Smith


Nov 19 '05 #1
2 3991
before Binding Data to grid

write

this.datagrid1.currentpageindex = 0
i used this and my problem was solved.
Apr 26 '07 #2
follow this link to find out the reason why this happens
http://support.microsoft.com/default...b;en-us;555074

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"sabiha sonaseth" <sa****@yahoo.comwrote in message
news:9f******************************@ureader.com. ..
before Binding Data to grid

write

this.datagrid1.currentpageindex = 0
i used this and my problem was solved.

Apr 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Meg | last post by:
Hi All, I am having a problem with paging in datagrid and need some idea as to how to handle the problem 1. the datagrid is first filled with a select * all 2. the datgrid shows 10 pages...
0
by: Kelvin | last post by:
Hi all, I have to using 2 radiobuttons to control 2 datagrid summay and detail representively. when I click detail radionbutton, there are 10 pages records. when I click summary radiobutton, I...
0
by: Kelvin | last post by:
Hi all, I have to 2 radiobuttons to control 2 datagrid summay and detail representively. when I click detail radionbutton, In detail report 10 pages records. In the summary report just only 1...
1
by: Kelvin | last post by:
Hi All, I try to use the following microsft resolution web site, but still have same problem. http://support.microsoft.com/default.aspx?scid=kb;en-us;555074 I put the source code on...
1
by: Kelvin | last post by:
Hi All, "disable view state for the datagrid." How to do that ? Please advise ! Here is also attached my sources code ------------------------------------------- void DetailGrid_setPage (...
0
by: jm | last post by:
I get this error when I click one of the datagrids pages: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. It is not doing this on the submit as I have this: Sub...
2
by: Sandy | last post by:
Hello - I have a datagrid and a dropdownlist (which is outside the datagrid). When I click on a category in the dropdownlist, the datagrid changes to correspond to that category. The datagrid...
3
by: JackO | last post by:
I am getting the following error when I try to go to the second page of my datagrid: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount I have searched the other logs on this...
3
by: Franck | last post by:
Hello, in a datagrid, in the ItemDataBound event in some cells a add some javascript that show up an information strHref.Append("<A onclick=\"popupValid();\">"); strHref.Append("<span...
0
by: Antonio | last post by:
Hello, everyone. I am getting an "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." error message when I click on the Edit button on any pages in the datagrid besides the first...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.