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

Move Grid Column After Initialization

1 Answer 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric J at FADV
Top achievements
Rank 1
Eric J at FADV asked on 30 Mar 2016, 01:02 AM
Is it possible to dynamically move a grid column from one position to another, and does doing so impact the underlying array sequence of dataItems? I need to basically swap the positon of two columns depending on user selection of options elsewhere on the form. OR as an alternative clear the columns and recreate them in the desired sequence. This only needs to be done once per page load.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 30 Mar 2016, 11:13 AM
Hello,

For achieving the desired result you have few options, but the one that I would suggest is to use the reorderColumn method of the grid:
Although that the method will not swap the columns you can call the method for each column and simulate the swap.

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Eric J at FADV
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or