TableTools Not Working - Help

TableTools Not Working - Help

jbatzel1jbatzel1 Posts: 3Questions: 0Answers: 0
edited October 2011 in TableTools
Here is the code that I have for my table so far, though every time I try to add tabletools to the table the table doesn't work. I have commented out the script that I am using for tabletools.

[code]

$(document).ready(function() {
oTable = $('#example').dataTable({
"aaSorting": [[ 10, "desc" ]],
"bJQueryUI": true,
"iDisplayLength": 15,
"aLengthMenu": [[15, 25, 50, 100], [15, 25, 50, 100]],
"sPaginationType": "full_numbers", // [Edit: forgot the comma here when first posted]
"oLanguage": {
"sSearch": "Filter: "

// "sDom": 'T<"clear">lfrtip',
// "oTableTools": {
// "aButtons": [
// "xls" ]

}
});
} );

[/code]

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Its not going to help that you've for the TableTools initialisation inside the language object :-). There are also a number of syntax errors if you just uncomment the TableTools init you have there.

    [code]
    $(document).ready( function () {
    $('#example').dataTable( {
    "aaSorting": [[ 10, "desc" ]],
    "bJQueryUI": true,
    "iDisplayLength": 15,
    "aLengthMenu": [[15, 25, 50, 100], [15, 25, 50, 100]],
    "sPaginationType": "full_numbers", // [Edit: forgot the comma here when first posted]
    "oLanguage": {
    "sSearch": "Filter: "
    },
    "sDom": 'T<"clear">lfrtip',
    "oTableTools": {
    "sSwfPath": "/swf/copy_cvs_xls_pdf.swf",
    "aButtons": [
    "xls"
    ]
    }
    } );
    } );
    [/code]

    Allan
This discussion has been closed.