Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1817

Multi Query with different numbers of columns

$
0
0
I have a table element in a div, I used it for multi querys pipeline.

when i click button1, will run the code below:
$('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)
				},
			} );

and when i click button2, will run the code below
$('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)
				},
			} );

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~?

Viewing all articles
Browse latest Browse all 1817

Trending Articles