Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35272

Tabletools not working with multiple datatables in the same page

$
0
0

I'm using the TableTools plugin to extract data, this is how I'm initializing it:

var tt= new $.fn.dataTable.TableTools(myTable,{
            "buttons":[
                "copy",
                "csv",
                "xls",
                "pdf",
                {"type":"print", "buttonText":"Print me!"}
            ],
            "sSwfPath":'/Scripts/media/swf/copy_csv_xls_pdf.swf'
        });
        $(tt.fnContainer()).insertBefore("#TABLE_ID_HERE_wrapper");

This works when I have one datatable in the page but as soon as I have 2 or more datatables the buttons don't do anything when clicked, anyone know why this is?


Viewing all articles
Browse latest Browse all 35272

Trending Articles