Datatable inside ui tabs bad width

Datatable inside ui tabs bad width

gierre10774gierre10774 Posts: 1Questions: 1Answers: 0

Hi,

i've jquery ui tabs and datatable server side inside a tab.

If datatable is in first tab is ok, but if it's in other tab, width is not set to 100%, colums are not allined.

This my code

            var oTable = $('#newswebpart').dataTable( {
                dom: 'TC<"clear"><"toolbar">lfrtip',
                oTableTools: { 
                "sSwfPath": "/resources/datatables1.10.2/extensions/TableTools/swf/copy_csv_xls_pdf.swf"         

                 },
                "autoWidth": true,
                "bProcessing": true,
                "bServerSide": true,

"sAjaxSource": "/wia/manager/2012/list_ss_back.asp",
"bSortable": true,
"scrollX": true,
"scrollY": 420,
"iDisplayLength": 10,
"order": [[2, 'desc']],
"oLanguage": {
"sSearch": "Filtra per oggetto:"
},
"drawCallback": function () {

$('#newswebpart tbody tr').each( function() {
if ($(this).find('td').eq(1).length > 0){
    data_inserimento = $(this).find('td').eq(2).html().substring(6 , 8) + "/" + $(this).find('td').eq(2).html().substring(4 , 6) + "/" + $(this).find('td').eq(2).html().substring(0 , 4);

var el = $('<td align="center" valign="center">' + data_inserimento + '</td>');

}
$(this).find('td').last().after(el);
$(this).find('td').eq(2).hide();

}
} );

This discussion has been closed.