Can't get DataTables TableTools to display

earachefl picture earachefl · Nov 28, 2011 · Viewed 11k times · Source

Dunno what I'm doing wrong here. I have DataTables in the directory:

MainFolder/common/js/DataTable-1.8.2/jquery.dataTables.min.js

and am including it like so:

<script src="common/js/DataTable-1.8.2/jquery.dataTables.min.js"></script>

I've downloaded the latest version of TableTools and have tried putting it in various places inside the DataTable-1.8.2 directory:

MainFolder/common/js/DataTable-1.8.2/TableTools-2.0.1

MainFolder/common/js/DataTable-1.8.2/Extras/TableTools-2.0.1

MainFolder/common/js/DataTable-1.8.2/media/(all files included in media/)

I'm initializing my tables like so (after Ajax calls):

$('#grid-container').dataTable({
'aaData': response.AADATA,
"aoColumns": aoColumns,
"bJQueryUI": true,
"bDestroy": true,
"iDisplayLength": 20,
"sDom": '<"H"lTfr>t<"F"ip>'
});

I have also tried setting the sSwfPath parameter using

"oTableTools": {
    "sSwfPath": "Extras/TableTools-2.0.1/media/swf/copy_cvs_xls_pdf.swf" //and many other permutations, including relative to the Main Folder root
}

I have also tried disabling the bjQueryUI parameter and using the regular sDom default settings, as well as placing the "T" marker in different places in the sDom string.

I simply can't get TableTools to display in any browser. Flash Player 11.1.102.55 is installed. Console shows no errors.

Answer

Daniel picture Daniel · Nov 29, 2011

I haven't actually worked with TableTools, but I did activate it once (just to see what it is)

I am not sure that this is the reason, but have you tried setting the sDom as it says in the example to:

"sDom": 'T<"clear">lfrtip'

Because the one you posted is different.