Instead of passing the value like
My Code is like:
if I pass array in excluded_clmns_sorting variable and doing the following code:
Please guide me how to resolve this issue.
{'bSortable': false},null,null,null,null,null,null,null,null,null,null,null,null,null,{'bSortable': false} in aoColumns can I pass a string which is also containing the same value as above.My Code is like:
var excluded_clmns_sorting = $('#sorting_val').val();
//the above variable returns {'bSortable': false},null,null,null,null,null,null,null,null,null,null,null,null,null,{'bSortable': false}.
var oTable = $('#data-table').dataTable( {
"sDom": 'CT<"clear">firtlip',
"oTableTools": {
"sSwfPath": basePath+"/js/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [ {"sExtends": "csv","sFileName" : curpath+".csv","sButtonText": "Save to CSV","mColumns": "visible"} ]
},
"aoColumns" : [excluded_clmns_sorting]
} );
In js Console it is showing nCell is undefined.if I pass array in excluded_clmns_sorting variable and doing the following code:
var excluded_clmns_sorting = $('#sorting_val').val();
var excluded_clmn_sorting = (excluded_clmns_sorting) ? excluded_clmns_sorting.split(",") : [];
$.each(excluded_clmn_sorting, function (i) {
excluded_clmn_sorting[i] = (excluded_clmn_sorting[i]);
})
var oTable = $('#data-table').dataTable( {
"sDom": 'CT<"clear">firtlip',
"oTableTools": {
"sSwfPath": basePath+"/js/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [ {"sExtends": "csv","sFileName" : curpath+".csv","sButtonText": "Save to CSV","mColumns": "visible"} ]
},
"aoColumns" : [excluded_clmn_sorting],
"aoColumnDefs": [{
"bVisible": false,
"aTargets" : excluded_clmn
},
],
"iDisplayLength": 10,
'sPaginationType': 'full_numbers'
} );
Then in js Console it is showing only oCol is undefined. Please guide me how to resolve this issue.