Using fnHeaderCallback with multiple header rows

Using fnHeaderCallback with multiple header rows

ChrisJonesChrisJones Posts: 1Questions: 0Answers: 0
edited July 2011 in General
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

Replies

  • frequentfrequent Posts: 23Questions: 0Answers: 0
    maybe a little late, but I ran into a similar issue and solved it like this in my dataTables() call

    "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
    },
This discussion has been closed.