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

Save & restore visited page of grid

3 Answers 174 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grzegorz
Top achievements
Rank 1
Grzegorz asked on 25 May 2014, 05:04 PM
Hi,


I have a kendo mvc grid on Razor View, which is collecting data by AJAX request to Controller.

I Would like to save page visited by user and when that user comes back grid automatically would load last visited page.

View code:

@(Html.Kendo().Grid<OrderListItemModel>()
    .Name("orders")
    .Columns(columns =>
    {
....
 .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id(order => order.Id))
        .PageSize(10)
        .Read(read => read.Action(Mvc.Crud.AjaxFilter,...

any my AjaxFilterMethod:

public virtual ActionResult AjaxFilter([DataSourceRequest]DataSourceRequest request, FilterModel filter)
        {
            var model = GetListItems(filter);
            var result = model.ToDataSourceResult(request);
            return Json(result);
        }

any suggestions how i can achieve this?

Best Regards

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 28 May 2014, 06:56 AM
Hi,

If you need to preserve the Grid state across the pages in your application you can check the following CodeLibrary demos which shows two different approaches of achieving this:

Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
DAN
Top achievements
Rank 1
answered on 12 Nov 2014, 06:10 PM
The "Save Grid state in session on server side" link above was almost what I needed. Do you have the code for a Telerik grid (not Kendo)? Apparently, the differences in Telerik vs Kendo components is substantial.
0
Vladimir Iliev
Telerik team
answered on 13 Nov 2014, 08:54 AM
Hi,

Please note that as of June 2013, Telerik Extensions for ASP.NET MVC has reached its official End of Life (EOL), with no additional fixes or enhancements expected in the future. I would strongly suggest to upgrade to Telerik UI for ASP.NET MVC as we no longer provide support for the Telerik Extensions.

Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Grzegorz
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
DAN
Top achievements
Rank 1
Share this question
or