Changing the Column width Dynamically based on Content
Changing the Column width Dynamically based on Content
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!
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!
This discussion has been closed.