show comparison in another columns

show comparison in another columns

wintermelon_loverwintermelon_lover Posts: 6Questions: 5Answers: 0
edited July 20 in Free community support

Link to test case: http://live.datatables.net/hicegewa/1/edit
Description of problem: I currently have two tables and each table was like:
table1:

table2:

Can I merge them to a table like:

by grouping them with index and compute weight loss with Datatables?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 13,625Questions: 25Answers: 3,205
    Answer ✓

    The diff column would require rowspan to be used which isn't supported, by Datatables, in the tbody. One option might be to use the RowGroup extension. You can group by the index column then output the difference in the row added by RowGroup. For example:
    http://live.datatables.net/hicegewa/2/edit

    There are some comments in the example. See this example for rowGroup.endRender for more details.

    Kevin

Sign In or Register to comment.