I would like to keep the PageIndex of a DataGrid, but am having trouble with it...
Whenever I select, let's say, page 5 on the DataGrid and click on the edit item, after clicking on the update button I want to come back to page 5, but it is always going to page 1.
I tried to load the page index to a session whenever the PageIndexChanged sub is fired, but when I write out the session at the page_load sub it gives me the previous page index, not the current. From within the PageIndexChanged sub it displays the right index. Whenever I return back from updating the record, the Page_Load sub displays the right index from the Session, but never sets the page to the index I need, it displays the 1st page...
I even tried to set GridName.CurrentPageIndex = 4 in the Page_Load sub, but it is still going to page 1 instead of 5. Is there a magic word I have to write for it to start setting the page index I want?
Could anybody help me with this?
Thank you,
Waldis