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

[Solved] Storing Current Page

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Scott
Top achievements
Rank 1
Scott asked on 31 Dec 2011, 06:25 PM
I'm trying to store the current page of the grid so that if a user is on Page 5 and leaves a grid page and goes back, they remain on the same page. Looking at your paging demo on this page:

http://demos.telerik.com/aspnet-mvc/razor/grid/paging 

I am using Ajax selection the same way, but I don't see any way to retrieve the current page. Can you please advise?

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Jan 2012, 01:48 PM
Hello Scott,

 I believe that the following Code Library will be of help:
http://www.telerik.com/community/code-library/aspnet-mvc/grid/preserve-grid-state-between-pages.aspx

Kind regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Scott
Top achievements
Rank 1
answered on 04 Jan 2012, 03:19 AM
Hello Georgi,
Thank you for your response. What if you are using Client row selection? For Example:

function onRowSelected(e) {
   var tourGrid = $('#TourGrid').data('tGrid');
   tourId = e.row.cells[0].innerHTML;
 
   document.location.href = tourGrid.ajax.updateUrl + '/' + tourId;
}

Is there a way I could just persist the values in the session? 
0
Georgi Tunev
Telerik team
answered on 04 Jan 2012, 02:59 PM
Hello Scott,

 Generally speaking, you cannot store something taken with JavaScript in the server session. What you can do as an alternative is to add the value to the query string for example.

Kind regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Scott
Top achievements
Rank 1
Share this question
or