FnClearTable(0)

FnClearTable(0)

ankitaankita Posts: 1Questions: 0Answers: 0
edited December 2013 in DataTables 1.8
Hi, I am trying to use fnClearTable(0).
[code]
if (typeof oTable1 == 'undefined') {
oTable1 =$("#myTable").dataTable({
"aLengthMenu" : [[ 9, 27, 50, -1 ],[ 9, 27, 50, "All" ] ],
iDisplayLength : 9,
"bAutoWidth" : false,
"sPaginationType" : "full_numbers",
"bJQueryUI" : true,
"sDom" : '<"H"Tlfr>t<"F"ip>',
"oTableTools" : {
"aButtons" : [ "copy", "csv", "pdf" ],
"sSwfPath" : "/abc/ext/jquery/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"bDestroy":true,
"aaSorting": [[ 0, "desc" ]],
"aoColumns": [
{ "sWidth": "25%" },
{ "sWidth": "25%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "15%" },
{ "sWidth": "10%" },
{ "sWidth": "5%" }
]
});
}
else
{
oTable1.fnClearTable(0);
$("#myTable").dataTable({
"aLengthMenu" : [[ 9, 27, 50, -1 ],[ 9, 27, 50, "All" ] ],
iDisplayLength : 9,
"bAutoWidth" : false,
"sPaginationType" : "full_numbers",
"bJQueryUI" : true,
"sDom" : '<"H"Tlfr>t<"F"ip>',
"oTableTools" : {
"aButtons" : [ "copy", "csv", "pdf" ],
"sSwfPath" : "/abc/ext/jquery/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"bDestroy":true,
"aaSorting": [[ 0, "desc" ]],
"aoColumns": [
{ "sWidth": "25%" },
{ "sWidth": "25%" },
{ "sWidth": "10%" },
{ "sWidth": "10%" },
{ "sWidth": "15%" },
{ "sWidth": "10%" },
{ "sWidth": "5%" }
]
});
}
[/code]
Now In the else case fnClearTable function is not working sometimes. I cannot figure out that sometimes its working and sometimes its not working. please Help

Replies

  • allanallan Posts: 61,439Questions: 1Answers: 10,052 Site admin
    "Not working sometimes" - that sounds a bit odd! Can you please link to a test page showing the issue: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
This discussion has been closed.