Returning to the same page using a DataGrid

  • Thread starter Thread starter Eric Caron
  • Start date Start date
E

Eric Caron

Hi,

In a typical "show-list-click-one-and-edit" scenario, I use a DataGrid on
the "list" page using the pager option. Say I'm on page 2, click edit on an
item and click Cancel on the edit page (which is another web form), what
would be the ideal way to return to the same page in the list? I would have
to store the page number in my request I suppose?

On a similar topic, is there a way to obtain the familiar PageCount
properties from the ADO days using the DataGrid?

TIA!
 
Eric,

You've got it figured out already. I use ViewState to store the current
page.

And yes you can get or set the current page with DataGrid.CurrentPage

And the number of pages with DataGrid.PageCount

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top