Calling TableTools native print function from custom print function
Calling TableTools native print function from custom print function
bcarsto
Posts: 1Questions: 0Answers: 0
I have registered my own print function via aButtons as follows, Then give the options to my dataTable.
options["oTableTools"] = {
"aButtons": [
{ "sExtends": "copy", "mColumns": mColumns },
{ "sExtends": "xls", "mColumns": mColumns },
{ "sExtends": "pdf", "mColumns": mColumns },
{ "sExtends": "print",
"fnClick": function(nButton, oConfig, oFlash) {
dataTable.fnSetColumnVis(mColumns.length, false);
// call TableTools._fnPrintStart
// call TableTools.fnPrint
$(window).keyup(function() {
dataTable.fnSetColumnVis(mColumns.length, true);
// ca;; TableTools._fnPrintEnd();
});
}
}
]
};
My print function is called, but I want to call into TableTools native fnPrint to allow it to do what it does to prep the table for printing.
Then when esc is called I want to call into _fnPrintEnd to restore the DOM. My question is how do I call TableTools native print functions from my custom print function.
thanks in advance,
bob
options["oTableTools"] = {
"aButtons": [
{ "sExtends": "copy", "mColumns": mColumns },
{ "sExtends": "xls", "mColumns": mColumns },
{ "sExtends": "pdf", "mColumns": mColumns },
{ "sExtends": "print",
"fnClick": function(nButton, oConfig, oFlash) {
dataTable.fnSetColumnVis(mColumns.length, false);
// call TableTools._fnPrintStart
// call TableTools.fnPrint
$(window).keyup(function() {
dataTable.fnSetColumnVis(mColumns.length, true);
// ca;; TableTools._fnPrintEnd();
});
}
}
]
};
My print function is called, but I want to call into TableTools native fnPrint to allow it to do what it does to prep the table for printing.
Then when esc is called I want to call into _fnPrintEnd to restore the DOM. My question is how do I call TableTools native print functions from my custom print function.
thanks in advance,
bob
This discussion has been closed.
Replies
There is no public API to programmatically end the print at the moment.
Allan