This is a migrated thread and some comments may be shown as answers.

Browser back Button loses grid results

1 Answer 188 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kerry
Top achievements
Rank 1
Kerry asked on 29 Jun 2009, 04:40 AM
Hello, I have a radgrid where paging has been turned on, the datasource is set on the NeedDatasource event, when the grid is populated all is fine, the paging works great however if the user decides to press the browsers back button to go back to one of the prevoiusly viewed pages, one of two things happen, either the grid is refreshed and the pagination is gone (i.e. all records appear on one long page) or I get a page not found error.  I'm not using ajaxmanager when populating the grid the EnableViewState = true.

Any ideas on what could be causing this.....when I do use the AjaxManager the browser back button will take me back to the page before the grid was populated, I guess because the paging AJAX request does not register in the browsers history.

Thanks Kerry

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 29 Jun 2009, 09:58 AM
Hi Kerry,

The ajax controls are using xmlhttp requests which update silently parts of the page. The browser Back and Forward functionality is only available when a full postback has occurred and that is the reason for them not to remember the last page state after ajax request. 
Find more information in the following helps article:
Back and Forward browser buttons (browser history)

Additionally, for more information about how to enable Back button in ASP.NET AJAX web sites, please refer to the following links.
http://geekswithblogs.net/frankw/archive/2008/10/29/enable-back-button-support-in-asp.net-ajax-web-sites.aspx
http://www.asp.net/learn/3.5-extensions-videos/video-242.aspx
http://www.microsoft.com/uk/msdn/nuggets/nugget/303/Managing-Browser-History-with-ASPNET-AJAX-and-the-ASPNET-35-Extensions-Preview.aspx

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Kerry
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or