Drag & drop child rows with Parent row

Drag & drop child rows with Parent row

How we can drag & drop child rows with Parent row in data table.

we have a requirement if we drag parent row than all child rows also should drag. we have one column Product. which defines child & Parent rows. Please help me on this.

Answers

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin

    Hi,

    Thanks for your question. I've just created a little test case that uses RowReorder (which I assume you are using to do the row drag and drop?) with a child row and it appears to work as expected: http://live.datatables.net/cihefawi/1/edit .

    The example only has a child row on the first row in the table when it is initially drawn, but that's just because this is a simple test case :smile:. The child row doesn't move as part of the drag, but it is correctly shown under the newly repositioned row when it is dropped.

    Regards,
    Allan

This discussion has been closed.