print button as a generic hide/show button [SOLVED]

print button as a generic hide/show button [SOLVED]

jp_noronhajp_noronha Posts: 59Questions: 0Answers: 0
edited February 2012 in TableTools
Hi allan,

I am almost finished my litle projet to create an class objet (based in asp.net gridview) to use datatables for renderind tables. my final toutch is a button to show a chart of the table (using plot.js as core engine for it).
I started to convert tabletools in another plugin by removing code that a didn't need (i prefer not to change scripts that i may need to upgrade in the future). I folllow this line of work because i just needed to use the print and collection buttons, but also had to alter the behavior of the print button to, instead of hide everything except for the table, hide everything except the object I say.

My suggestion is a simple one.
upgrade de behavior of the print button to hide a given object instead of the table, by default if there is no object in is configuration it will use the table as it is now.
This way we can use the print button to other purposes than print, for exemple to hide everything except a div with a chart of the table, to show something we may want to print other than the table himself in a cleaner way.

DataTable is one of the best,
joao noronha

Replies

  • jp_noronhajp_noronha Posts: 59Questions: 0Answers: 0
    edited February 2012
    I had to change tabletools, but print has now another propertie to say wich object is to show (it hides the rest) and two more functions, fnPrintStart and fnPrintEnd to act as before print and after print, when pressing ESC.

    anyone that needs something similar just mail me.
    Has soon as possible i will put it in the web.

    Joao
This discussion has been closed.