How to change width
How to change width
The first one of table column is ID and because it is very short, the arrow image on the right-side of ID comes top of ID.
It seems that width of each column is dynamically generated by js.
How can I over-write it so that I can increase the width of a column for ID?
Thanks in advance.
It seems that width of each column is dynamically generated by js.
How can I over-write it so that I can increase the width of a column for ID?
Thanks in advance.
This discussion has been closed.
Replies
The solution for this that you required is the following:
in your initialization code use the sWidth for the columns you wish to set and turn off the Auto Width like so:
[code]
var oTable = $('.selector').dataTable({
"bAutoWidth": false, // This turns off auto column widths
"aoColumns": [ { "sWidth": "10%" }, // This is the ID column
{ "sWidth": "90%" } // the sWidth can be set for all columns if required
]
})
[/code]
The if the sWidth is not specified on all columns then the width of those will be determined by the browsers rendering engine i believe.
Hope this helps.
Regards,
Izzy