Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82132

Changing the Column width Dynamically based on Content

$
0
0
Hi there

First of all, Datatables are awesome. I am, however, having a bit of a problem. I use DT to display data from a DB and on fnColumn, have icons whose number cannot be predetermined. In my code, I check:
if (fnColumns.length < size)
$("#column_odd").css("width", "20px");
Basically, what I want to do is increase the size of the column, based on the length of fnColumn. Otherwise the data jumps to the next line. I hope this make sense!

Hope you will help!

Viewing all articles
Browse latest Browse all 82132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>