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

Reorder kendo ui Grid Columns programmatically

3 Answers 1415 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sentil
Top achievements
Rank 1
Sentil asked on 16 May 2013, 08:53 AM
Hi

I have one requirement
i am displaying 12 months in grid, and i have one text box and button
when they type april and click button grid should reorder from april to march

Senthil

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 16 May 2013, 09:11 AM
Hi Sentil,


To reorder the columns programatically you should use the reorderColumn method of the Grid. It accepts as a parameters the new index of the column and the actual column object from the grid.columns array.

Please let me know if this was the information that you were looking for. Wish you a great day.

 

Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cecile
Top achievements
Rank 1
answered on 30 Jan 2019, 03:07 PM

Hi,

 

I reopen this subject.

reoderColumn work for only one column but if I want to reorder sevelral columns it doesn't work.
I'd like to display a grid with the memorised columns order of the user and reorderColumn is not OK.

Best regards

0
Viktor Tachev
Telerik team
answered on 01 Feb 2019, 12:02 PM
Hi Cecile,

If you would like to persist the settings of the Grid I would suggest utilizing the getOptions and setOptions methods. Check out the example below that illustrates how the grid settings can be persisted and restored.



Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Sentil
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Cecile
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or