How to get column actual width without assgin width

How to get column actual width without assgin width

xlzeroxlzero Posts: 6Questions: 4Answers: 0

Hi,

I am using "autoWidth": true, and let the data flow. Now I want to get the actual width of all columns, are there other ways to get the width instead of $('.dataTables_scrollHeadInner').width()

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @xlzero ,

    You can specify the column and pass the nodes to jQuery, like this:

    $(table.column(1).nodes()).width()
    

    Hope that does the trick,

    Cheers,

    Colin

This discussion has been closed.