Fixed position of a row (won't move when sorting)

Fixed position of a row (won't move when sorting)

IAMKALMARIAMKALMAR Posts: 2Questions: 2Answers: 0

Hey guys,
After I generate my table with dt, I'm calling fnInitComplete() and add a Sums row as the last row.
But when I'm sorting the table, the sum's row moves up. I want to keep it as the last row.
Can I do that with DT ??

thx

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    There are numerous other threads on this topic. Example. Search for "fixed row sorting" and you'll find them.

    The answer, as noted in other threads, is that it is possible to keep a row in the tbody in one position, but you need to write custom sorting functions. If you just want the row to appear always at the bottom of the table, then just put it in the footer.

    Allan

This discussion has been closed.