Invalid currentPageIndex error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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
 
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
 
Back
Top