473,402 Members | 2,053 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,402 software developers and data experts.

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

Meg
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 12345678910
3. the first page shows 10 records
4. if do a keyword search on the full dataset the selected
records are returned...I can repeat this many times while
my page index is set to page 1.
5. I can also repeat the select all and the above steps
still work (page index is set to page 1)
6. If I move off of page 1 to another page like say page 5.
page 5 and it's records work
7. if I do a select * all the page count stays at page 5
(most likely because of the !postback in page load)
8. I if I do a keyword search and I am not set to page 1 I
get the error message "Invalid CurrentPageIndex value. It
must be >= 0 and < the PageCount".
9. how can I initiallize the dataset back to page 1
programmicaly?

Any help is greatly appreciated.

Meg
Jul 19 '05 #1
3 14592
Did u try to set dataGrid.CurrentPageIndex = 1. The internals of the
datagrid should work out the details for you, assuming you have a valid data
source.

--
Kevin Cunningham
Software Architects
"Meg" <me****@yahoo.com> wrote in message
news:28****************************@phx.gbl...
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 12345678910
3. the first page shows 10 records
4. if do a keyword search on the full dataset the selected
records are returned...I can repeat this many times while
my page index is set to page 1.
5. I can also repeat the select all and the above steps
still work (page index is set to page 1)
6. If I move off of page 1 to another page like say page 5.
page 5 and it's records work
7. if I do a select * all the page count stays at page 5
(most likely because of the !postback in page load)
8. I if I do a keyword search and I am not set to page 1 I
get the error message "Invalid CurrentPageIndex value. It
must be >= 0 and < the PageCount".
9. how can I initiallize the dataset back to page 1
programmicaly?

Any help is greatly appreciated.

Meg

Jul 19 '05 #2
Meg
Yes I did. But I still get the same error.
-----Original Message-----
Did u try to set dataGrid.CurrentPageIndex = 1. The internals of thedatagrid should work out the details for you, assuming you have a valid datasource.

--
Kevin Cunningham
Software Architects
"Meg" <me****@yahoo.com> wrote in message
news:28****************************@phx.gbl...
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 12345678910
3. the first page shows 10 records
4. if do a keyword search on the full dataset the selected records are returned...I can repeat this many times while my page index is set to page 1.
5. I can also repeat the select all and the above steps
still work (page index is set to page 1)
6. If I move off of page 1 to another page like say page 5. page 5 and it's records work
7. if I do a select * all the page count stays at page 5
(most likely because of the !postback in page load)
8. I if I do a keyword search and I am not set to page 1 I get the error message "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount".
9. how can I initiallize the dataset back to page 1
programmicaly?

Any help is greatly appreciated.

Meg

.

Jul 19 '05 #3
ooops, sorry the CurrentPageIndex is zero-base ... dataGrid.CurrentPageIndex
= 0.

--
Kevin Cunningham
Software Architects
"Kevin Cunningham" <kcunningham@sarkDtown> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Did u try to set dataGrid.CurrentPageIndex = 1. The internals of the
datagrid should work out the details for you, assuming you have a valid data source.

--
Kevin Cunningham
Software Architects
"Meg" <me****@yahoo.com> wrote in message
news:28****************************@phx.gbl...
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 12345678910
3. the first page shows 10 records
4. if do a keyword search on the full dataset the selected
records are returned...I can repeat this many times while
my page index is set to page 1.
5. I can also repeat the select all and the above steps
still work (page index is set to page 1)
6. If I move off of page 1 to another page like say page 5.
page 5 and it's records work
7. if I do a select * all the page count stays at page 5
(most likely because of the !postback in page load)
8. I if I do a keyword search and I am not set to page 1 I
get the error message "Invalid CurrentPageIndex value. It
must be >= 0 and < the PageCount".
9. how can I initiallize the dataset back to page 1
programmicaly?

Any help is greatly appreciated.

Meg


Jul 19 '05 #4

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...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.