API to programmatically read columns widths
API to programmatically read columns widths
Novidis
Posts: 11Questions: 2Answers: 0
in DataTables
Are there any API to get colums widths afetr the datable has been rendered?
This discussion has been closed.
Replies
Not via DataTables. You could use jQuery's
$().width()
method though.Allan
In our application we need to know the witdh of each column or to define it programmatically
You can refer to this example: agrisophia.nubilo.it:52531/test_plugin
No widths are returned by jQuery (please refer to the log in the console)
at the same time the configuration
"columnDefs": [{ "width": 100, "targets": "_all" }]
seems not to be take in account
This is your code to display the columns width:
You aren't using jQuery to get the column widths. Try this:
Kevin
Ok, thanks now we succesfully read the columns width and can align several table in the same page