Saving column reorder in a Kendogrid.

1 Answer 918 Views
Grid
krekfin
Top achievements
Rank 1
krekfin asked on 12 Oct 2021, 03:43 PM | edited on 14 Oct 2021, 01:25 PM

Hello, I'm having trouble using Kendo-grid. I don't know how to make my app remember the column reordering positions. As soon as I refresh the page, it resets to the old value. I haven't found anything even remotely useful on SO. The delete column works fine, when i delete a column it stays deleted until i decide to restore it applinked app. I know there's an event called ColumnReorderEvent, but I don't know how to use it in a way to save the reordered grid as the new default for the user that reordered it.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 15 Oct 2021, 11:42 AM

Hi Krekfin,

You can use the Grid getOptions() and setOptions() method to obtain and set later Grid options including the column order. This is shown in the following official demo:

Furthermore, persisting the state automatically when the user leaves the page and returns back is demonstrated in the following article:

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
krekfin
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or