Completed
Last Updated: 06 Apr 2015 17:16 by Erik
Erik
Created on: 06 Apr 2015 16:50
Category: Kendo UI for jQuery
Type: Feature Request
2
Column Reorder trigger event
When reordering the columns, it would be great if the COLUMNREORDER event would fire AFTER the columns are reordered. This would be good in situations where a column reorder triggers a request to persist the new state of the options somewhere. 
2 comments
Erik
Posted on: 06 Apr 2015 17:16
My goal is to listen for a COLUMNREORDER event and then call getOptions to retrieve the settings of the grid and save that in a persistence layer. 

Currently, if I were to call the getOptions method inside a delegate for the COLUMNREORDER event I will get the columns in their order before the reorder executes.

You can confirm this by looking at lines 2057 in the kendo.grid source file, you'll notice that the trigger is executed before the columns are reordered. 
ADMIN
Telerik Admin
Posted on: 06 Apr 2015 16:56
The columnReorder event argument holds the old and new column index (see this article for reference: http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-columnReorder), which you can use for state persistence, Erik.

Additionally, note that you can persist grid state utilizing the setOptions method of the grid:
http://demos.telerik.com/kendo-ui/grid/persist-state