Problem adding Print Button

Problem adding Print Button

jackalbrightjackalbright Posts: 14Questions: 4Answers: 0
edited August 2012 in TableTools
I'm new to DataTables (I like it a lot, so far). I have been successful in integrating the basic DataTables functionality, but am having a problem adding a print button. I see no Print button. All other navigation items are visible and work as they should. I wonder, do I need an additional plugin?

Here is my initialization code:

oTable = jQuery('#subscriptionTable_dataTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",

"oTableTools": {
"aButtons": [
{
"sExtends": "print",
"sButtonText": "PRINT",
"bShowAll": true
}
]
}
});

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You need TableTools: http://datatables.net/extras/tabletools/ . It is included in the 'extras' directory in the DataTables download package.

    Allan
  • jackalbrightjackalbright Posts: 14Questions: 4Answers: 0
    Thanks Allan,
    I have now added tabletools, but the buttons still do not appear. I'm using the basic button setup, like this:
    oTable = jQuery('#subscriptionTable_dataTable').dataTable({
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",

    "oTableTools": {
    "aButtons": [
    "print"
    ]
    }
    });

    I can see that the TableTools.min.js file is indeed loaded.
This discussion has been closed.