Align footers of two side-by-side datatables

Align footers of two side-by-side datatables

ben.hellben.hell Posts: 7Questions: 3Answers: 1

Hi,

One short question: I have to tables (parent/child) side-by-side. Is there a possibilty to align the footers, so that they are positioned also side-by-side if one of the tables contains less/more rows then the other table, so essentially the tables amount of rows is always fixed and filled up with empty rows?

Thanks a lot,

Ben

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Hi Ben,

    You would need to use drawCallback or draw and inside that function check page.info() to determine if more rows need to be added. If so, you can just use jQuery or DOM methods to append the rows to the table. They will be automatically removed by DataTables on the next draw if required.

    Allan

  • ben.hellben.hell Posts: 7Questions: 3Answers: 1

    Hi Allan,

    Thanks a lot. This sounds like an reasonable way to go. I'll try this out.

    Best,

    Ben

This discussion has been closed.