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?

uskerineuskerine Posts: 33Questions: 15Answers: 0
edited October 2014 in Free community support

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,

Answers

  • allanallan Posts: 61,618Questions: 1Answers: 10,089 Site admin

    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

This discussion has been closed.