How do you add a row via rows().add at the bottom of the table?
How do you add a row via rows().add at the bottom of the table?
uskerine
Posts: 33Questions: 15Answers: 0
I have a table defined which retrieves values from AJAX call.
oTable = $('#myTable').DataTable( .... );
Later in the progam flow I want to dynamically add rows
oTable.row.add( [ ..... ] ).draw();
The row is properly added but it appears on the top, instead of appearing at the bottom.
What is missing to get the new row be added at the bottom instead of at the top?
Thanks,
This discussion has been closed.
Answers
The row will be positioned according to the ordering applied to the table. Where ever the table's ordering positions the row, that is where it will appear.
Allan