473,503 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invalid currentPageIndex error message

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 is paged. If the pager is not on the first
page, I receive the following error: "Invalid currentPageIndex value. It
must be >= 0 and < PageCount." What do I have to put in my code to "set" the
pager to the value it has on the first page?

Any help will be greatly appreciated!
--
Sandy
Nov 19 '05 #1
2 1377
If you change the rows to be shown in the DataGrid (via a filter, say) and
the previous page index is now out of bounds, you need to recalculate (or
simply set to zero) a new current page index.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 is paged. If the pager
is not on the first page, I receive the following error: "Invalid
currentPageIndex value. It must be >= 0 and < PageCount." What do I
have to put in my code to "set" the pager to the value it has on the
first page?

Any help will be greatly appreciated!


Nov 19 '05 #2
Thanks so much, Brock!

This is a real "duh." I can't believe I didn't even really read the error
message. My first inclination was to try to set it to 1 (for what reason, I
don't know) and then to panic. Guess I need a little sleep!

Thanks again.

Sandy

"Brock Allen" wrote:
If you change the rows to be shown in the DataGrid (via a filter, say) and
the previous page index is now out of bounds, you need to recalculate (or
simply set to zero) a new current page index.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 is paged. If the pager
is not on the first page, I receive the following error: "Invalid
currentPageIndex value. It must be >= 0 and < PageCount." What do I
have to put in my code to "set" the pager to the value it has on the
first page?

Any help will be greatly appreciated!


Nov 19 '05 #3

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

Similar topics

3
14601
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
1339
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
1062
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
2174
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
1102
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...
1
1811
by: CW | last post by:
Is this by design or is it a bug? If you have a pageable datagrid. After you delete a row from the grid (which results in a reduction in the number of pages of the datagrid), asp.net throws an...
3
1576
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
487
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
1350
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
7198
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
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
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
7319
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
7449
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
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.