This is a migrated thread and some comments may be shown as answers.
Preserve Grid State
1 Answer 25 Views
This is a migrated thread and some comments may be shown as answers.
Jillian
Top achievements
Rank 1
Jillian asked on 03 Apr 2013, 08:42 PM
I need to preserve the filter, page, sort of my grid after moving off the page and coming back to it.  I found using a cookie to preserve grid state in the code library: http://www.kendoui.com/code-library/web/grid/preserve-grid-state-in-a-cookie.aspx. I have an MVC application, so I am having some difficulty understanding what is going on in the example, and what I would need to do to make this work with MVC.  Can someone explain how to make this logic work with MVC?

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 04 Apr 2013, 03:45 PM
Hello Jillian,


The logic applied in the demo could be used for both MVC and Web Grid. The current implementation relies on the jquery-cookie plugin to save and read the cookies with the Grid state. Basically on each dataBound event we are reading the Grid state and saving it in a "employeesState" cookie and on each change event we get the selected items and save them in "empRows" cookie. On document ready we check if the cookie exists and apply the saved state.

 

Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jillian
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or