FixedColumns not working for header

FixedColumns not working for header

hellsonhellson Posts: 3Questions: 1Answers: 0

Hey

I've been staring at this problem for hours and can't figure it out. I'm using a table with 2 fixed columns (on the left). This works just fine with the table body, but for some reason, the contents of the two fixed column headers "duplicate" when the table is scrolled. See for yourself:
http://goo.gl/Pe2c2v

These are my DataTable settings:

    $('#myTable').DataTable( {
    paging: false,
    scrollY: "400px",
    scrollX: true,
    select: true,
    fixedColumns: {
        leftColumns: 2
    },
    fixedHeader: {
        header: true
    }
    });

I really hope someone here knows how to solve this!

Cheers

Answers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    Hi,

    As the compatibility table notes, FixedHeader and FixedColumns cannot be used on the same table at the same time. Sorry.

    Allan

  • hellsonhellson Posts: 3Questions: 1Answers: 0

    Hey Allan

    Thanks for getting back on this. I had removed fixedHeader, but this did not solve the problem of the "duplicating" header. It looks like the error occured during my editing of the css file (using the default CSS files the headers worked just fine)

    Cheers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    Can you give me a link to the page showing the issue with FixedColumns please.

    Allan

  • hellsonhellson Posts: 3Questions: 1Answers: 0

    Hey Allan

    I started from scratch, using the default CSS files, implementing and testing my changes step by step, and now it seems to work. Not sure what was wrong the first time, but it was related to me changing the CSS files.

    Thanks again!

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    Cool - good to hear you've got it working now :-)

    Allan

This discussion has been closed.