How to call TableTools functions instead of using the buttons
How to call TableTools functions instead of using the buttons
nlz242
Posts: 17Questions: 0Answers: 0
I'm sure this is fairly simple, however after searching i didn't find any thread asking about this.
I'd like to call TableTools functions directly, so i can integrate them in my existing UI.
For example, my UI has a menu bar with drop-down. I'd like to have a "Print" sub-menu with "Print (all columns)" and "Print (current columns)" (using ColVis). I'd also like to have a similar sub-menu for Excel.
Should i make custom buttons using "aButtons" and then use jQuery appendTo to move them somewhere else? While this would work, it doesn't seem like it would be the best method to achieve the result i'm looking for.
Being able to directly call the functions from the 's inside my / seems to be the best option. Anyone's done that or could put me in the right direction?
Thanks in advance!
I'd like to call TableTools functions directly, so i can integrate them in my existing UI.
For example, my UI has a menu bar with drop-down. I'd like to have a "Print" sub-menu with "Print (all columns)" and "Print (current columns)" (using ColVis). I'd also like to have a similar sub-menu for Excel.
Should i make custom buttons using "aButtons" and then use jQuery appendTo to move them somewhere else? While this would work, it doesn't seem like it would be the best method to achieve the result i'm looking for.
Being able to directly call the functions from the 's inside my / seems to be the best option. Anyone's done that or could put me in the right direction?
Thanks in advance!
This discussion has been closed.
Replies
Allan
Thanks for the quick answer.
For fnPrint, it looks like it should work, ill try that out.
Looking at TableTools, i also realised that it would be difficult to implement Excel exportation as im using server side processing. I guess i'll bypass DataTables and just create an excel file, server side, by providing the colVis and colOrder settings from the table to my server. I'll have to figure out how to read those, that shouldnt be too hard i guess.
Thanks!