fnDraw redraws table with column width changed
fnDraw redraws table with column width changed
I am using following post to enable inline editing in my tables drawn by DataTables.
http://www.datatables.net/blog/Inline_editing
Problem I am facing is fnDraw corrupts my column sizes when it redraws table after save/restore.
Here is my table defined.
[code]
$( "#btch_rpt" ).dataTable({
"bProcessing" : true,
"bDestroy": true,
"sAjaxSource": "/ajax/batchrpt.php",
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": 'bnum=' + $("#batch_number").val(),
"success": fnCallback
} );
},
"bJQueryUI": true,
"oTableTools": {
"sSwfPath" : "/js/DataTables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": []
},
"sDom": '<"H"f>t<"F"ip>Tr',
"aoColumns": [
{ "sClass": "center","sWidth": "60px" },
{ "sWidth": "100px" },
{ "sType": "date", "sWidth": "65px" },
{ "sClass": "right","sWidth": "65px"},
{ "sWidth": "45px"},
{ "sWidth": "150px" },
{ "sWidth": "30px" },
{ "sWidth": "20px"},
{ "sWidth": "20px"},
{ "sWidth": "20px"}
],
"iDeferLoading": 0
});
[/code]
http://www.datatables.net/blog/Inline_editing
Problem I am facing is fnDraw corrupts my column sizes when it redraws table after save/restore.
Here is my table defined.
[code]
$( "#btch_rpt" ).dataTable({
"bProcessing" : true,
"bDestroy": true,
"sAjaxSource": "/ajax/batchrpt.php",
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": 'bnum=' + $("#batch_number").val(),
"success": fnCallback
} );
},
"bJQueryUI": true,
"oTableTools": {
"sSwfPath" : "/js/DataTables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": []
},
"sDom": '<"H"f>t<"F"ip>Tr',
"aoColumns": [
{ "sClass": "center","sWidth": "60px" },
{ "sWidth": "100px" },
{ "sType": "date", "sWidth": "65px" },
{ "sClass": "right","sWidth": "65px"},
{ "sWidth": "45px"},
{ "sWidth": "150px" },
{ "sWidth": "30px" },
{ "sWidth": "20px"},
{ "sWidth": "20px"},
{ "sWidth": "20px"}
],
"iDeferLoading": 0
});
[/code]
This discussion has been closed.