Adding CloVis to Existing Buttons

Adding CloVis to Existing Buttons

tomekkicaj700tomekkicaj700 Posts: 2Questions: 2Answers: 0

Hi

I have the following DataTables initialization:



$('#example').dataTable({ "bJQueryUI": true, "bPaginate": true, // "sPaginationType": "two_button", "bJQueryUI": true, "iDisplayLength":50, "bLengthChange": true, "bFilter": true, "bSort": true, "order": [[ 0, "desc" ]], "bInfo": true, "bAutoWidth": true, "aoColumns": [ null,null,null,null,null,null,null,null,null,null,null,null, null,null,null,null //put as many null values as your columns ], "tableTools": { "sSwfPath": "../resources/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf", "sRowSelect": "multi", "dom": 'T<"clear">lfrtip', "aButtons": [ { "sExtends": "div", "sTitle": "info" }, { "sExtends": "copy", "bSelectedOnly": "true" }, // "print", { "sExtends": "collection", "sButtonText": "Save", "aButtons": [ { "sExtends": "csv", "bSelectedOnly": "true" }, { "sExtends": "xls", "bSelectedOnly": "true" }, { "sExtends": "pdf", "bSelectedOnly": "true", "sPdfOrientation": "landscape" } ] } ] } });

How do I add Colvis button the the existing buttons?

I tried

    var colvis = new $.fn.dataTable.ColVis( table );
 
    $( colvis.button() ).insertAfter('div.info');

but din't know how to add the div.info to the table.

Thanks
Tom

This discussion has been closed.