Fixed column width and Ajax datasource
Fixed column width and Ajax datasource
Hello!
I have an issue with the columns width.
I need several columns with the fixed width, so I use following config:
[code]
$('#table-users').dataTable({
"bProcessing": true,
"sDom": 'T<"clear">"<"top"lf<"clear">>rt<"block-actions"ip>"',
"sAjaxSource": '/admin/get_users_list',
"bAutoWidth": false,
"sScrollX": "100%",
"oTableTools": {
........
},
"aaSorting": [],
"aoColumnDefs": [
{ "sWidth" : "200px", "aTargets": [ 17 ] }
]
});
[/code]
When the page is loaded the width of the 17th column is equal to "200px", but when data is loaded, width recalculation occurs and the 17th column becomes shorter.
Could anyone help with this issue ?
Best regards,
Andrey
I have an issue with the columns width.
I need several columns with the fixed width, so I use following config:
[code]
$('#table-users').dataTable({
"bProcessing": true,
"sDom": 'T<"clear">"<"top"lf<"clear">>rt<"block-actions"ip>"',
"sAjaxSource": '/admin/get_users_list',
"bAutoWidth": false,
"sScrollX": "100%",
"oTableTools": {
........
},
"aaSorting": [],
"aoColumnDefs": [
{ "sWidth" : "200px", "aTargets": [ 17 ] }
]
});
[/code]
When the page is loaded the width of the 17th column is equal to "200px", but when data is loaded, width recalculation occurs and the 17th column becomes shorter.
Could anyone help with this issue ?
Best regards,
Andrey
This discussion has been closed.