Completed
Last Updated: 28 Sep 2017 21:48 by Waheed
Kyle
Created on: 21 Dec 2012 19:32
Category: Kendo UI for jQuery
Type: Feature Request
113
save/restore grid column state
Currently in Kendo UI if a user sorts a grid column and leaves the page, when they come back the sorting has been reverted. I think there should be a way to automatically save the grids sorting state (potentially in cookies) so that when a user leaves the page and comes back, the state is how they left it.
19 comments
Waheed
Posted on: 28 Sep 2017 21:48
I have ag-grid in which when user move a column let says from 3rd position to 1st position it stays there but upon refreshing the page it goes back to 3rd postion. I want somehow it to retain the position. 
ADMIN
Telerik Admin
Posted on: 19 Feb 2016 11:04
Saul, I recommend you to post your technical inquiries in the forums or support system at telerik.com to get assistance from our support team.
Imported User
Posted on: 18 Feb 2016 11:12
but now we have new problem :)  You are storing options in cookies but when i update grid browsers read from grid so i need to delete browser cache

Is it possible way to instead of delete browser cache like reset grid ???
ADMIN
Telerik Admin
Posted on: 24 Nov 2014 17:17
This feature includes column settings as well as sorting, paging and filtering state. You can see it demonstrated in this demo:
http://demos.telerik.com/kendo-ui/grid/persist-state
Michael
Posted on: 21 Nov 2014 22:17
Does this include visible/hidden columns , group fields, filters ?
ADMIN
Telerik Admin
Posted on: 21 Nov 2014 14:20
Supported with Q3 2014
ADMIN
Telerik Admin
Posted on: 16 Oct 2014 10:11
@Cory:
I think that you will find the following example useful > http://www.telerik.com/support/code-library/enable-shareable-urls-of-ajax-bound-grid-via-the-browser-history-api

Feel free to modify/extend it to integrate AngularJS in it.

@N Snaddel: We'll expose two methods (setOptions and getOptions) which will allow you to save and restore grid's datasource, columns and configuration options state. Via these two methods you'll be able to choose whether to store the grid state in a cookie, local storage or make an ajax request and pass the state server-side.
N
Posted on: 15 Oct 2014 16:07
Is the plan to implement this in cookies or server side as well? Will it just be sorting? Or saving more aspects (e.g. width, filter, size, etc.)?
Saving server side would be preferable, in my opinion.
Cory
Posted on: 06 Aug 2014 06:10
Now that Kendo UI fully supports AngularJS, I think this is a great opportunity to utilize routing to support query params for storing grid state (see Ember's query params).

http://emberjs.com/guides/routing/query-params/
Imported User
Posted on: 30 Jul 2014 11:27
The state of the filter is held when refreshing the browser but once that data is filtered out it cant be removed after refreshing. For example I'll filter on all Apple entries and then refresh the browser. You can no longer uncheck Apples and show all the data again. So once you filter and end your session you can't unfilter that item. I was wondering if this was an bug or could possibly be added.
ADMIN
Telerik Admin
Posted on: 20 Jun 2014 11:51
Edu, feel free to share the code of your solution in this thread, or post it in our grid widget code library (http://www.telerik.com/support/code-library/kendo-ui/grid).
EDU
Posted on: 17 Jun 2014 10:15
i have achieved that functionality, the columnsetting is saved in a database
Thomas
Posted on: 30 May 2014 12:55
Unfortunately the use of cookies was not good enough for the well known reason: cookies are lost from one PC to the other and also when you clear cookies from browser cache or switch to different browsers in the same PC. Therefore we re-implemented a custom solution that saves Grid Column State (Grid Configuration) for each different user in DB.
What would be helpful will be 2 functions only:
1. e = GetGridColumnState()
2. SetGridColumnState(e)
where e is a json string.
The storage of info I think should be left to the user (programmer).
Thomas
Posted on: 28 Feb 2014 15:30
For supporting this functionality we are using cookies and custom code. We save column widths and we are considering on saving also sorting and grouping user preferences. It will be great if such functionality is supported automatically from grid.
Jon
Posted on: 15 Feb 2014 02:09
http://www.telerik.com/forums/preserve-grid-state-in-a-cookie---razor-syntax

I used that as a starting point.  Added a notification to my users when grid is filtered because too many users were confused if the grid came back somewhat empty.  It seems the filtered icon inverted was not quite enough for them to understand what was going on.
Ramin
Posted on: 30 Dec 2013 11:28
it should support hidden and visible column save/restore
Graeme
Posted on: 19 Dec 2013 13:45
Yeah DataTables http://datatables.net/ implements this feature perfectly. We have moved to Kendo for good MVC integration but features like this being missing is upsetting users.

Can save all state with DataTables - should remember - sort order, columns displayed, and any filter settings. Should have an option to reset.
Paul Reynolds
Posted on: 19 Mar 2013 01:20
It would be great to expand this to cover 'state' as a whole, i.e. grouping, filters, orders as well as sorting.
John
Posted on: 27 Feb 2013 16:32
If you save the state, and use query with the options, it will apply filters, and sorting.
Maintaining column order is a bit more tricky since it doesn't recognize index or display order, and it is just in the order they are added.