Last post Sep 14, 2010 03:33 PM by jjfrick
Feb 23, 2009 05:02 PM|defyant_2004|LINK
When a user selects the "results per page" to another number other than the default OR a user advances to a higher page number in the GridView other than page "1". The settings are not retained when going between the "list.aspx" and "edit.aspx". The user
has to reset the "results per page" and scroll through the paging to get back to the "page number" they were at when they decided to edit the data.
List --> Edit --> List
Is it possible for the application to remember where the user was at after performing the operation on the edit page and return to that exact page number/location AND for it to also remember how many "results per page" the user selected?
Feb 24, 2009 02:32 AM|sjnaughton|LINK
See my article here: AJAX History in a Dynamic Data Website which could be expanded to facilitate your requirements.
Feb 24, 2009 04:36 PM|defyant_2004|LINK
Thanks for the article. That explains it very well to me. I ended up using some session variables to keep track of the gridview1.pageindex and gridview1.pagesize. It seems to work very well.
Feb 27, 2009 04:42 AM|m@rco|LINK
Can you post the code how you solved this?
Mar 11, 2009 03:48 PM|defyant_2004|LINK
Do you still need the code? I will post it for you if you do. I was out of town, sorry for the delay in response.
Mar 11, 2009 07:06 PM|sjnaughton|LINK
Post it anyway so if anyone comes along later they can see your solution, the net's full of unanswered question lets answer as many as we can here [:D]
Mar 15, 2009 08:01 AM|m@rco|LINK
yes, I hope you'll post it asap!
Mar 16, 2009 12:10 PM|defyant_2004|LINK
GridView1.PageSize = Session(
GridView1.PageIndex = Session(
Label2.Text = Session(
Let me know if you have any questions. This is for the List.aspx page.
I am just storing the values in the session for the page to use.
Mar 17, 2009 04:32 AM|m@rco|LINK
thx for your fast reply!
When do you set the values? (when the pagesize or pageindex is changed)
I think you also need to store the (previously) visited list url, otherwise the pagenumber can be set for another list url.
Mar 17, 2009 10:06 AM|defyant_2004|LINK
Example 1: In the GridViewPager.ascx.vb file I modify three lines of code. See the bold below in example 1.
Example 2: In the List.aspx.vb file, I added the GridView1_PageIndexChanged event to modify the index number. See the bold below in example 2.
_gridView.PageSize = Session(
-------example 2 - this event was added
Sep 14, 2010 03:33 PM|jjfrick|LINK
Is there a way to set the default value to say.. "30" and leave it at that for everyone?