How to insert row after specific row?
How to insert row after specific row?
aagrawal
Posts: 1Questions: 1Answers: 0
Hi,
I am using datatables re-reorder plugin. I have some functionality that will insert row after specific row. But i dont find any use full article.
This discussion has been closed.
Answers
The difficulty is that Datatables will oder the table once you add the row. In order to place it at a specific location you will need to determine the index to use (based on the RowReoder column index. I suspect that you will also need to increment all the indexes after it by one.
This example provides an index column. Maybe it will give you a start for the code you will need to increment the indexes:
https://datatables.net/examples/api/counter_columns.html
Kevin