Specifiying Column Width is not working
Specifiying Column Width is not working
I am using Datatables 1.8.1 along with TableTools. For one of my columns I entered a long character string (>200 chars) and it completely messed up my table in that it enlarged the column (and hence table) to accommodate. I was using autowidth so I turned that off and specified a width of "200px". The first time the table is drawn the Header is correctly 200px. Stepping through the DT code the table gets redrawn on the statement "o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );" which is in the _fnScrollDraw function.
I can't post the code but here is similar code:
[code]
var myTable = $('#myTable').dataTable( {
"bFilter": false,
"bInfo": false,
"bPaginate": false,
"bAutoWidth": false,
"aaSorting: [[0, "desc"]],
"aoColumns": [
{ "sType": "serial"},
null,
{ "sWidth": "200px"},
{ "sType": "date"},
null,
null,
null
],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sRowSelect": "single"
}
});
$(window).bind("resize", function() {
myTable.fnAdjustColumnSizing();
});
[/code]
Anybody have suggestions?
I can't post the code but here is similar code:
[code]
var myTable = $('#myTable').dataTable( {
"bFilter": false,
"bInfo": false,
"bPaginate": false,
"bAutoWidth": false,
"aaSorting: [[0, "desc"]],
"aoColumns": [
{ "sType": "serial"},
null,
{ "sWidth": "200px"},
{ "sType": "date"},
null,
null,
null
],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sRowSelect": "single"
}
});
$(window).bind("resize", function() {
myTable.fnAdjustColumnSizing();
});
[/code]
Anybody have suggestions?
This discussion has been closed.