Dynamically added rows and rowReorder

Dynamically added rows and rowReorder

Héctor CapulinHéctor Capulin Posts: 6Questions: 4Answers: 0

I would like to know if there is possible to add the row reorder functionality in a datatable which is already initialized and the rows of this table are dynamically added by the user.
1. $("#table").DataTable({}); is already added.
2. The users through an input add rows to the table.
And of course if there is a way, how can I do it?

Answers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    There are rowReorder.enable() and rowReorder.disable() methods for RowReorder, so if you know you are going to need row reordering at some point during the life cycle of the table, you would enable it in the initialisation as normal and then immediately disable it, enabling as and when required.

    Allan

This discussion has been closed.