How can I move a sortable hierarchy grid row into nested sortable grid?

1 Answer 229 Views
Grid Hierarchical Data Source Sortable
Stephen
Top achievements
Rank 1
Stephen asked on 26 May 2021, 09:43 PM
I can move rows from the nested grid up to the master grid, but I can't get it to work the other way. Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 31 May 2021, 12:15 PM

Hi Stephen,

For Hierarchical data, where we need to drag and drop the rows and update the parentId field, I recommend using the TreeList component. A runnable demo can be found at the following link:

Otherwise, if the Grid is used you will have to use the Kendo UI Draggable. The idea is that every child grid in the hierarchy and the parent should be a drop target. When the dragstart event is fire one should define a drop target as shown in the initially linked demo and subscribe to its drop event. When the drop handler of the target is hit one can manipulate the HTML of the grid or the data items to perform the needed operations.

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid Hierarchical Data Source Sortable
Asked by
Stephen
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or