My table is too large
My table is too large
soipo
Posts: 3Questions: 0Answers: 0
Hi,
I have just updated to the version 1.9 and I am having the following issue:
My table has 13 rows and I am setting theirs width.
No matter what I do the table has width 2168px, the odd thing is that even if I am trying to resize the table through console, the width won't change.
here my code :
[code]
$('#example').dataTable( {
"bAutoWidth": false,
"aoColumnDefs": [
{ "aTargets":[0],"sWidth": "5%" },
{ "aTargets":[1],"sWidth": "5%" },
{ "aTargets":[2],"sWidth": "10%" },
{ "aTargets":[3],"sWidth": "15%" },
{ "aTargets":[4],"sWidth": "5%" },
{ "aTargets":[5],"sWidth": "10%"},
{ "aTargets":[6],"sWidth": "5%" },
{ "aTargets":[7],"sWidth": "5%" },
{ "aTargets":[8],"sWidth": "5%" },
{ "aTargets":[9],"sWidth": "5%" },
{ "aTargets":[10],"sWidth": "5%" },
{"aTargets": [11], "sWidth": "10%" },
{ "aTargets":[12],"sWidth": "15%" ,"bSortable": false }
],
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"bPaginate": true,
"bJQueryUI": false,
"aaSorting": [[0,'desc']],
"sAjaxSource": "<?=site_url("/tables/tablecreator");?>",
"bJQueryUI": true,
"oLanguage": {
"sSearch": "Search all columns:"
},
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
}
} );
[/code]
Thanks for the help.
I have just updated to the version 1.9 and I am having the following issue:
My table has 13 rows and I am setting theirs width.
No matter what I do the table has width 2168px, the odd thing is that even if I am trying to resize the table through console, the width won't change.
here my code :
[code]
$('#example').dataTable( {
"bAutoWidth": false,
"aoColumnDefs": [
{ "aTargets":[0],"sWidth": "5%" },
{ "aTargets":[1],"sWidth": "5%" },
{ "aTargets":[2],"sWidth": "10%" },
{ "aTargets":[3],"sWidth": "15%" },
{ "aTargets":[4],"sWidth": "5%" },
{ "aTargets":[5],"sWidth": "10%"},
{ "aTargets":[6],"sWidth": "5%" },
{ "aTargets":[7],"sWidth": "5%" },
{ "aTargets":[8],"sWidth": "5%" },
{ "aTargets":[9],"sWidth": "5%" },
{ "aTargets":[10],"sWidth": "5%" },
{"aTargets": [11], "sWidth": "10%" },
{ "aTargets":[12],"sWidth": "15%" ,"bSortable": false }
],
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"bPaginate": true,
"bJQueryUI": false,
"aaSorting": [[0,'desc']],
"sAjaxSource": "<?=site_url("/tables/tablecreator");?>",
"bJQueryUI": true,
"oLanguage": {
"sSearch": "Search all columns:"
},
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
}
} );
[/code]
Thanks for the help.
This discussion has been closed.
Replies
Allan
Allan
you are a star, thank you so much !
I have just give 100% width to the input and and all went smooth !