Fixed column width not working :/

Fixed column width not working :/

tekuilatekuila Posts: 24Questions: 5Answers: 0

Hello
I've seen other working examples, but I tried a lot of things and still the fixed column width is not working on my table.

http://live.datatables.net/qadupaya/1/edit

Could someone give a quick hint?
I know I haven't set width in this example linked to, but it's because I couldn't make it work.

Thank you
- Jonas

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi tekuila,

    You needed to include the fixedColumns scripts and styling in your HTML. You also need to define the fixedColumns property in your initialisation. In the example I have done the following.

    "fixedColumns": {
          leftColumns: 3,
        },
    

    I have linked the example here.

    This will mean that your custom styling will need some adjustment for the floating header.

    Hope this helps,

    Sandy

  • tekuilatekuila Posts: 24Questions: 5Answers: 0

    Thanks! I tried to include fixedColumns etc, but didn't work.

    I found that adding CSS "table-layout: fixed;" to the table was the solution. :D

This discussion has been closed.