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

Serialize / Deserialize Grid

1 Answer 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 11 Apr 2017, 11:50 AM
I am using the Kendo grid in an MVC application. I would like to provide a way for users to save a grid layout (serialize it). Then, later, when a user comes back to the page, I'd like to enable the user to restore the grid layout exactly as they had saved it. I presume I would do this by taking the serialized copy of the grid, feed it to some grid method which would then modify the grid layout to match the serialized copy. Is this possible to do with the Kendo grid?

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 12 Apr 2017, 02:48 PM
Hello Randy,

This functionality is achievable by using the setOptions and getOptions methods.
Furthermore, a runnable example is available here:

http://demos.telerik.com/aspnet-mvc/grid/persist-state

Additionally, if you are using a toolbar or header templates with razor syntax, they are not going to load as expected due to a known limitation of the setOptions method. A workaround for this behavior is outlined in this example: 

http://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/state/grid-preserve-server-toolbar-template-after-set-options

Regards,
Preslav
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or