Move a row from tbody to tfoot

Move a row from tbody to tfoot

rstelowrstelow Posts: 1Questions: 0Answers: 0
edited April 2014 in DataTables 1.9
My ajax resultset contains both detail rows and a total row. How can I move the total row from the tbody section to the tfoot section? Would like to allow sorting that does not include total row and apply different styling.

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    You would need to use fnServerData (in 1.9-) or `ajax.dataSrc` (in 1.10+) to modify the data result from the server to split the result set into the two components and then use fnInitComplete to write the footer information into the footer.

    Allan
  • dstelowdstelow Posts: 1Questions: 0Answers: 0
    Same question as above except the data is an existing array (with both detail rows and a total row) used to initialize the table (using aoColumns). After the table has been initialized (or during), how can I move the total row (easily identifiable) from the body to the footer?
This discussion has been closed.