Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82779

TableTools Direct Initialization is not working

$
0
0
Hello,

I have initialized TableTools inside DataTable Initialization and It works perfectly, but For some reason I need to initialize TableTools on Button Click. so I Tried a test, I am initializing it just after DataTable got initialized.
$(document).ready(function () {
        var oTable = $('#dTTTIntEx').dataTable({
            "bJQueryUI": true,
            "sPaginationType": "full_numbers",
            "bProcessing": true
        });
        var oTableTools = new TableTools(oTable, {
            "aButtons": [
                "copy",
                "csv",
                "xls",
                "pdf",
                { "stype": "print", "sButtonText": "Print me!" }
            ]
        });

        $('#demoDTTT').before(oTableTools.dom.container);
    });
I am getting this error :

Line: 1400 - var oTableTools = new TableTools(oTable, {
Error: Object doesn't support this action

Can anybody have a suggestion for me. Thank you.

Viewing all articles
Browse latest Browse all 82779

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>