General information
Title:
Paging in gridview, reset page to 1
I have a webform with a gridview and an objectdatasource. I enabled paging on my gridview. The paging works great when I populate the objectdatasource.
The only problem I have is if I am on page 9 in the gridview and I re-populate the objectdatasource, the data displays correctly in my gridview but the page that is showing is page 9. I would like the paging to reset to page 1. How can I do this?
For example, query1 might display 15 pages of data. Query2 might display 4 pages of data. If query1 is displaying in the gridview and I am on page 9 of 15 and press the button to display query2's results, the gridview page sets it's self to page 4 of 4. I would like the page reset to page 1 of x. Is there a property to set for this?
Thanks,
Jerry
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only