Question

I am using datatable and tabletools to exports to CSV, but what I want is to diable xls, copy to clipboard and print buttons. I am using the below functionality as described in the documentation but it is not working. It still shows all buttons.

$("#table").dataTable({bDestroy: true,"sPaginationType": "full_numbers","sDom": 'T<"clear">lfrtip',
            "oTableTools": {
                "sSwfPath": "media/swf/copy_csv_xls_pdf.swf",
                "aButtons": [
                    "csv",                        
                    {
                        "sExtends":    "collection",
                        "sButtonText": "Save",
                        "aButtons":    [ "csv" ]
                    }
                ]
            }
        });

also tried with this

"oTableTools": {
                    "aButtons": [
                        "csv"
                    ]
                }

but no use

Was it helpful?

Solution

I got it working by using tabletool version TableTools version 2.0.0. Before I was using TableTools version 1.0.2 which causes to not to hide the buttons with datatable version 1.9.4.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top