How to fix each column's width in fixedColumn
How to fix each column's width in fixedColumn
Each of column in fixed column area always has same width.
I try to use aoColumnDef to fix the width but it's not work.
here is my code
table = $('#myTable').dataTable({
"bSort": false,
"bFilter": false,
"bLengthChange": false,
"sScrollX": "100%",
"bScrollCollapse": true,
"bAutoWidth" : false,
"aoColumnDefs": [
{ "sWidth": "50px", "aTargets": [ 0 ] },
{ "sWidth": "100px", "aTargets": [ 1 ] },
{ "sWidth": "150px", "aTargets": [ 2 ] },
{ "sWidth": "150px", "aTargets": [ 3 ] },
{ "sWidth": "150px", "aTargets": [ 4 ] },
{ "sWidth": "50px", "aTargets": [ 5 ] }
]
});
new FixedColumns( table, {
"iLeftColumns": 6,
"iLeftWidth": 600
});
Thanks for your help
I try to use aoColumnDef to fix the width but it's not work.
here is my code
table = $('#myTable').dataTable({
"bSort": false,
"bFilter": false,
"bLengthChange": false,
"sScrollX": "100%",
"bScrollCollapse": true,
"bAutoWidth" : false,
"aoColumnDefs": [
{ "sWidth": "50px", "aTargets": [ 0 ] },
{ "sWidth": "100px", "aTargets": [ 1 ] },
{ "sWidth": "150px", "aTargets": [ 2 ] },
{ "sWidth": "150px", "aTargets": [ 3 ] },
{ "sWidth": "150px", "aTargets": [ 4 ] },
{ "sWidth": "50px", "aTargets": [ 5 ] }
]
});
new FixedColumns( table, {
"iLeftColumns": 6,
"iLeftWidth": 600
});
Thanks for your help
This discussion has been closed.
Replies