Kendo React Grid - Save Grid Reordering of Rows

1 Answer 150 Views
Grid
Jason
Top achievements
Rank 2
Iron
Iron
Iron
Jason asked on 13 Dec 2022, 05:12 PM

Greetings,

Is there a way to save the grid after reordering the rows?

I know there is an option for reordering the columns by using the onColumnReorder event.

Please help, thanks!

 

Regards,

Jason

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 15 Dec 2022, 12:13 PM

Hi Jason,

Thank you for contacting us.

The row reordering is not a built-in feature in the Grid and our examples demonstrate how you can update the data being passed to the Grid after reordering the rows. With that in mind, you can just save the re-ordered data in order to persist the reordering.

The best solution for this would be to have a order field in your data items, so that you can update only that order field after the re-ordering. Having such field will then allow you to sort the Grid over that field. Also, having such field will allow you to keep the data array as is and only update the order field in the data items accordingly, which will update the order in the Grid.

Hope this helps.

 

Regards,
Konstantin Dikov
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
Jason
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or