ToogleButtons shows Visisble:false Columns!!
ToogleButtons shows Visisble:false Columns!!
Mauro26
Posts: 17Questions: 7Answers: 0
Hi everybody,
I'm having an issue with this and i don't know how can i make this work.
i have this
$('#ID_Order2').html('<table cellpadding="0" class="Table_BI" cellspacing="0" border="0" id="ID_Orderoverview2" style="width: 100% !important;display:none;"></table>');
var table = $('#ID_Orderoverview2').dataTable( {
"dom": 'Brtip',
"stateSave": true,
buttons: [
{
extend: 'columnsToggle',
columns: ':gt(4)'
}
],
"fnServerData": "fnDataTablesPipeline",
"aaSorting": [[2,'desc'], [4,'desc']],
"iDisplayLength": 20 ,
"bLengthChange": false,
"bInfo" : true,
"sPaginationType": "full_numbers",
"bFilter": true,
"oLanguage": {
"sLengthMenu": "$!strLengthMenu _MENU_ $!strRecord",
"sZeroRecords": "$!strZeroRecords",
"sInfo": "$!strShowing _START_ $!strTo _END_ $!strOf _TOTAL_ $strRecords",
"oPaginate" :{
"sFirst":"$!strFirst",
"sLast":"$!strLast",
"sNext":"$!strNext",
"sPrevious":"$!strPrevious"},
"sProcessing":"$!strProcessing",
"sInfoEmpty": "$!strShowing 0 $!strTo 0 $!strOf 0 $!strRecords",
"sInfoFiltered": "($!strTotalBefore _MAX_ $!strTotalRecords)",
"sSearch":"$!strSearch"
},
"aaData": [
#foreach($element in $arr1)
[#foreach($x in $element)"$x" #if($foreach.hasNext),#end #end]
#if ( $foreach.hasNext )
,
#end
#end
],
"aoColumns": [## "aoColumns": [ columnDefs
{ "sTitle": "", "bVisible":false, "sClass": "primary", "Class":"primary", "bSearchable":false, "bExport": false },
{ "sTitle": "$!strDetails", "bSortable": false, "sClass": "thcentered tdcentered", "Class":"primary", "bSearchable":false, "bExport": false, "targets": [1] },
{ "sTitle": "$!strDocNo", "sClass": "thsorting tdleft", "bExport": true, "targets": [2] },
{ "sTitle": "$!strDoctype", "sClass": "thsorting tdleft", "bExport": true, "targets": [3] },
##{ "sTitle": "$!strCreated", "sCol": "docDate", "sClass": "thsorting tdleft","iDataSort": 0, "bSearchable":true, "bExport": true, "targets": [4] },
{ "sTitle": "$!strCreated", "sCol": "docDate", "sClass": "thsorting tdleft", "bSearchable":true, "bExport": true, "targets": [4] },
#if($bHasAuthShop)
#if($hideDocValues == "no") { "sTitle": "$!strNetVal","sClass": "thcentered tdright", "bSortable": false, "bSearchable":false, "bExport": true, "targets": [6] },#end
#if($bHasAuthFinance)
{ "sTitle": "$!strTaxVal", "sClass": "thsorting thcentered tdright", "bExport": true, "targets": [7] },
{ "sTitle": "$!strTotalVal", "sClass": "thsorting thcentered tdright", "bExport": true, "targets": [8] },
#end
#end
{ "sTitle": "$!strGoodIssueDate", "bSortable": false, "sClass": "tdleft", "bSearchable":false, "bExport": false, "targets": [9] },
{ "sTitle": "$!strInvoiceNumber", "sClass": "thsorting tdleft", "bExport": false, "targets": [10] },
#if($hideDocValues == "no"){ "sTitle": "$textPrint", "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false, "targets": [11] },#end
{ "sTitle": "$!strDeliveryStatus", "bSortable": false, "sWidth": "20px", "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false, "targets": [12] },
{ "sTitle": "status", "bVisible":false, "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":true, "bExport": false, "targets": [13] },
#if($bHasReturn){ "sTitle": "$textPrint", "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false },#end
##if($bHasAuthShop == true && $orderCanBeBought == "yes"){ "sTitle": "$strShopOrderRepeat", "bSortable": false, "sClass": "thcentered tdcentered" , "bSearchable":false, "bExport": false },#end
#if($bHasAuthShop == true ){ "sTitle": "$strShopOrderRepeat", "bSortable": false, "sClass": "thcentered tdcentered" , "bSearchable":false, "bExport": false },#end
#if($bHasReturn == true){ "sTitle": "$strReturn", "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false },#end
#if($bNotification || $bCustomerNotification){ "sTitle": "Enquiry", "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false } ,#end
#if($bComplaintManagementVetmedica) { "sTitle": "KA", "bSortable": false, "sClass": "thcentered tdcentered", "bSearchable":false, "bExport": false } ,#end
{"sTitle": "", "bVisible":false, "sClass": "thcentered tdcentered", "bSearchable":true, "bExport": false },
#if($bHasAuthShop)
{ "sTitle": "FilterAmount", "sCol": "SapAmount", "sClass": "thcentered tdcentered", "bVisible":false, "bSortable": false, "bExport": false},
#end
##Status Description
{ "sTitle": "Status", "sClass": "thcentered tdcentered", "bSortable": false, "bVisible":false, "bExport": true}
]
} );
It always shows all the columns with the property "bVisible":false
i need some help!
This discussion has been closed.
Replies
Hi @Mauro26 ,
There's a lot of code there. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin