Hiding table headers on export for all buttons

Hiding table headers on export for all buttons

sarahsarah Posts: 17Questions: 0Answers: 0
edited March 2011 in TableTools
Hi,
I'm assuming it's not possible to easily export a table with grouped columns in the header, so I'm trying to do the next best thing - export the table with no headers. I'm having trouble figuring out how to do this using the TableTools button options. I can define new custom buttons individually just fine, but I only want to have the default button set but with the "bHeaders": false option set for all of them. Is there a simple way to set an option for all buttons? I'm having trouble finding it/figuring it out...
Thanks so much,
Sarah

Replies

  • sarahsarah Posts: 17Questions: 0Answers: 0
    Ok, I figured this out more or less. I thought "flash" and "ajax" were the extendable button types for the default set. sighh. for anyone that needs to know, I just manually created each button in the same order as the default set and set the bHeader option for each:

    "oTableTools": {
    "sSwfPath": "/copy_cvs_xls_pdf.swf",
    "aButtons": [
    {
    "sExtends": "copy",
    "bHeader": false
    },
    {
    "sExtends": "csv",
    "bHeader": false
    },
    {
    "sExtends": "xls",
    "bHeader": false
    },
    {
    "sExtends": "pdf",
    "bHeader": false
    },
    {
    "sExtends": "print",
    "bHeader": false
    }
    ]
    }

    If there is a way to manipulate the default button set with fewer lines of code, throw it at me :)
This discussion has been closed.