| tofutown 2004-03-22, 2:36 pm |
| I'm writing an asp.net app that allow the user to do a search and displays the
results inside a datagrid.
It gave me the 'Invalid CurrentPageIndex Calue. It must be >=0 and < the page
count' error.
Although I know WHY this error is appearing: the user searches, and then goes
through the pages of the datagrid results to, say, page 30. Then, he do another
search (without leaving the page or returning to page 1 of the datagrid
paging). If the 2nd search has <30 pages, it will generate this error, because
according to the app, the currentpageindex is still at 30.
Does anybody know how to refresh the datagrid so that each time the user
presses the Search button, the currentpageindex is sent back to 0?
Thanks
|