Using fnHeaderCallback with multiple header rows
Using fnHeaderCallback with multiple header rows
![ChrisJones](https://secure.gravatar.com/avatar/765aacb134f8e729dcad14c013e9c216/?default=https%3A%2F%2Fvanillicon.com%2F765aacb134f8e729dcad14c013e9c216_200.png&rating=g&size=120)
I'm currently using fnFooterCallback to display dynamic totals in some columns of a data table.
I'd like to move it to the top of the table but BENEATH the column headings.
However, fnHeaderCallback only seems to receive the first in the section.
As a result, I can put the totals above the column headings, but not beneath them.
Is there a way to override this so that it is passed a different or the set of all s from ?
Thanks,
Chris
I'd like to move it to the top of the table but BENEATH the column headings.
However, fnHeaderCallback only seems to receive the first in the section.
As a result, I can put the totals above the column headings, but not beneath them.
Is there a way to override this so that it is passed a different or the set of all s from ?
Thanks,
Chris
This discussion has been closed.
Replies
"aoColumns": [
{"bSortable": false },
{"sClass": "your_class"},
{"bSortable": false },
],
"fnHeaderCallback": function( nHead ) {
$(nHead).closest('thead, THEAD').find('.yourClass').each( function () {
// this selects all th cell in multiple row headers, which you assigned a class of your_class
},