How can I call event handler when I click print button on the table tools? I need to hide one div when I press print button and before it goes in the print mode?
Allan thank you for that info. Is it possible to change print layout? For example to add some elements that will be inside the print area together with the datatable?
You can use http://datatables.net/extras/tabletools/button_options#sMessage or the fact that the class 'DTTT_Print' is added to the body when in print view.
Well I found that your function is removing all the tags from bellow or above the table? I need to be able to choose that for example the bellow the table needs to be show?? Do you understand what I need?
Yes, and currently it isn't directly possible in TableTools. If you fork and add the feature (perhaps fire an event) if you could give me a pull request that would be great, as a 'printView' event sounds like it would be very useful.
Allan is it possible to have a PRINT button as a collection of Table Tools buttons that won't open your print mode? I am using your handler to start certain code when you click the button but I need to disable this possibility?
I will post the code later when I succeed to make a customized layout.
No, I'm saying use a 'text' button ( http://datatables.net/extras/tabletools/buttons#text ) and assign an fnClick function to it. That function can then do whatever you want.
Replies
[code]
$('a.DTTT_button_print').click( ... );
[/code]
Allan
Allan
I will post the code later when I succeed to make a customized layout.
Allan
Allan