TableTools 2.0 error in code for "Using jQuery UI themes" example

TableTools 2.0 error in code for "Using jQuery UI themes" example

jinjungjinjung Posts: 24Questions: 0Answers: 0
edited January 2011 in TableTools
Hello,
I just try this new version and there is an error in "Using jQuery UI themes" example.
The "collection" button not works with this example (example code from usage) and generate this alert :
"TableTools: Warning - unknown button type: undefined"
[code]
"aButtons": [
"copy", "csv", "xls", "pdf",
{
"type": "collection",
"buttonText": "Save",
"buttons": [ "csv", "xls", "pdf" ]
}
]
[/code]
But works with internal JS code example (code executed)
[code]
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
[/code]

Replies

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin
    Thanks Fabrice,

    I hadn't updated the visible sample code, although the running code was correct. I've updated it now: http://datatables.net/release-datatables/extras/TableTools/theme.html .

    Allan
  • kguskekguske Posts: 3Questions: 0Answers: 0
    The XLS links on the examples (e.g. http://datatables.net/extras/tabletools/) are working like CSV.

    Is there a way to add the buttons with jQuery UI without losing "Show 10 entries"?
  • kguskekguske Posts: 3Questions: 0Answers: 0
    Found how to keep "Show 10 entries" - add l back in sDom.
  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin
    > The XLS links on the examples (e.g. http://datatables.net/extras/tabletools/) are working like CSV.

    That is correct. Currently the XLS export is a UTF16-LE CSV file which can be opened by Excel no problem. The reason it doesn't do a proper XLS export is because I've not yet had time to read the XLS file format specification, understand it and implement it enough for TableTools! I can't see an XLS AS3 library either unfortunately. At some point soon I hope to be able to look at doing an XLSX export, but its just a question of getting the time to do it!

    Regards,
    Allan
  • lihailihai Posts: 15Questions: 0Answers: 0
    Hello Allan:
    Nice to meet you.I'm come from China.My name is lihai.I have a problem with the TableTools.
    I download the DataTables v1.9.4.And I open the demo page in DataTables-1.9.4\extras\TableTools.But all of the demo pages can't do well.That all the buttons can't useful onclick without the button of print.They have no reaction on click! My email 3931959@qq.com.Thank you.
This discussion has been closed.