Multi Query with different numbers of columns

Multi Query with different numbers of columns

holsetyholsety Posts: 1Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
I have a table element in a div, I used it for multi querys pipeline.

when i click button1, will run the code below:
[code]
$('table#table').dataTable( {
"bJQueryUI": false,
"bServerSide" : true,
"bProcessing": true,
"bDestroy" : true,
"bPaginate": true,
"bFilter" : false,
"bLengthChange" : false,
"sPaginationType": "full_numbers",
"sAjaxSource": "/getUserJson/",
"aoColumns" : [
{"sTitle" : "s1"},
{"sTitle" : "s2"},
{"sTitle" : "s3"},
{"sTitle" : "s4"},
{"sTitle" : "s5"},
{"sTitle" : "s6"},
{"sTitle" : "s7"}
],
"fnServerData" : function (sSource, aoData, fnCallback) {
fnDataTablesPipeline(sSource, aoData, fnCallback, oPostData)
},
} );[/code]

and when i click button2, will run the code below
[code]
$('table#table').dataTable( {
"bJQueryUI": false,
"bServerSide" : true,
"bProcessing": true,
"bDestroy" : true,
"bPaginate": true,
"bFilter" : false,
"bLengthChange" : false,
"sPaginationType": "full_numbers",
"sAjaxSource": "/getPlayerJson/",
"aoColumns" : [
{"sTitle" : "_s1"},
{"sTitle" : "_s2"},
{"sTitle" : "_s3"},
{"sTitle" : "_s4"},
{"sTitle" : "_s5"}
],
"fnServerData" : function (sSource, aoData, fnCallback) {
fnDataTablesPipeline(sSource, aoData, fnCallback, oPostData)
},
} );[/code]

the pipeline works fine, but the columns s6, s7 is still there after the _s5 column.

I have tried a lot ways, using fnDestroy, before I run the dataTable function. Destroy the table element, but I don't have a good resolution.

Anyone help~?
This discussion has been closed.