How Do I Implement sort in the second header row of 3
How Do I Implement sort in the second header row of 3
jamesk3
Posts: 1Questions: 1Answers: 0
I have a table that has three header rows. The first is to indicate grouping of related columns, the second contains the column labels and the third is a totals row that needs to appear at the top of the table. By default it is sorting on the bottom row which is the totals row. I know i can use SortCellsTop to use the first row. How do I go about specifying the second row?
This question has an accepted answers - jump to answer
Answers
You can use
order.listener()
.Kevin
Sorry, the above isn't going to do what you want.
Kevin
One option, depending on your header layout, might be to prepend the top header in
initComplete
. Something like this:http://live.datatables.net/sewukuya/1/edit
It uses
orderCellsTop
to initially set the ordering to the top header.Kevin
A better option might be to add the third row in
initComplete
or if you are usingheaderCallback
do something like this example from this thread to add the third header.Kevin