XLS, PDF, CSV buttons only works in "collection"

XLS, PDF, CSV buttons only works in "collection"

rolperezrolperez Posts: 7Questions: 0Answers: 0
edited December 2011 in TableTools
Hi! Imworking in Magneto Admin for a little project, i upgraded the datatables JS with the 1.9 Beta version and it still works fine....i have been installed de Tabletools too....when i add the tool bar of tabletools, only works the "Print" button, but when i put the buttons in "collection" it works....why doesnt work in normal mode?

my code is this:

[code]

$(document).ready( function () {
$('#tabledata').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
} );

[/code]

I need something more... in need to print a "DIV" in the print option and pdf option, you know...a div whit a logo and info, can i do that?

Thanks for the help!!

Have a great New Year's Eve!

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Are you initialising the table is a hidden element? If so that would explain the problem - the Flash buttons haven't been sized to match the buttons (since in a hidden element there is no sizing information available).

    http://datatables.net/extras/tabletools/api#fnResizeButtons and
    http://datatables.net/extras/tabletools/api#fnResizeRequired

    are the two API methods you'll need to check if a resize is needed and then to do the resize.

    Allan
  • rolperezrolperez Posts: 7Questions: 0Answers: 0
    Ok! -my bad- yeah, the table was in a tab....problem solved! thanks! one more thing...in need to print a "DIV" in the print option and pdf option, you know...a div with a logo and stuff...can you help me with that?
This discussion has been closed.