Can't get the [CSV, Save, PDF] etc. buttons to display when theming with twitter bootstrap

Can't get the [CSV, Save, PDF] etc. buttons to display when theming with twitter bootstrap

devcoderdevcoder Posts: 3Questions: 0Answers: 0
edited August 2012 in TableTools
Have this in my javascript tabeltools initialization
[code]
$(document).ready(function() {
$('#countstable').dataTable( {
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"aaSorting":[[0, "desc"]],
"iDisplayLength": 10,
"oTableTools": {
"sSwfPath": "swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
} );
[/code]

I have verified that the path to swf file is correct because it worked with jQuery theme. I got the buttons to display then, but since I switched to bootstrap theme, I can't get the buttons to display.

I followed the example on this page http://datatables.net/release-datatables/extras/TableTools/bootstrap.html and included the necessary datatables.bootstrap.js and datatables.bootstrap.css files. The table looks like it is in the example here http://datatables.net/blog/Twitter_Bootstrap_2.

Replies

  • allanallan Posts: 63,113Questions: 1Answers: 10,395 Site admin
    Can you link us to the page with the problem please - that looks fine.

    Allan
  • devcoderdevcoder Posts: 3Questions: 0Answers: 0
    Allan, I PMd you
  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1
    Isn't he missing the T in sDom to display Tabletools?

    "sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",

    The T in the first span6 class.

    Scott
  • allanallan Posts: 63,113Questions: 1Answers: 10,395 Site admin
    Hi Scott,

    Eagle eyes! Yes you are absolutely correct - the issue is simply not initialising TableTools :-)

    Allan
This discussion has been closed.