FixedHeader and Extra Header with Colspan

FixedHeader and Extra Header with Colspan

knkasknkas Posts: 1Questions: 0Answers: 0
edited May 2012 in FixedHeader
Hello,

I have found an ugly solution for a problem with FixedHeader.

The Problem: If a table has an extra header row with colspans, and there are several images in the columns (both header and table contents), the browser (FF8 in my case) is resizing the table while it is displayed (even when all image sizes are fixed). Using FixedHeader on this table will result in the header not matching the columns in the table.

Solution: Create the FixedHeader when the user scrolls the page.

[code]
jQuery(document).ready(function() {
oTable = jQuery('#table').dataTable();

var oFH;
jQuery(window).bin('scroll', function() {
if(!oFH) { oFH = new FixedHeader(oTable); }
}
}
[/code]

It would be very nice to have a better solution here!

Sorry, can't provide sample screenshots.

Replies

  • allanallan Posts: 54,523Questions: 1Answers: 8,525 Site admin
    Yup a bit messy that - but good to hear that you've got a working solution all the same. If you were able to give me a link to a test case showing the problem that would be very helpful.

    Allan
This discussion has been closed.