I wish to call the export functions from a menu outside of the Datatable.

I wish to call the export functions from a menu outside of the Datatable.

pachyderm94pachyderm94 Posts: 1Questions: 1Answers: 0

What I want to do is trigger some of the existing button actions from a menu that is hosted outside of the Datatable.

I have found an example of how to call the excelHtml5 action but that is always being called within the action handler for that button so all the function parameters (e, dt, button, config) map up pretty easy.

$.fn.dataTable.ext.buttons.excelHtml5.action.call(this,e, dt, button, config);

I have also seen examples where the buttons are positioned out of view and the clicked event is just triggered. I don't want to do that because of printing and that I do some crazy stuff with absolute positioning and scaling. Can I make the same call with parameters missing? Or can I get all of the needed parameters somehow?

Thanks for any help in advance.

Answers

This discussion has been closed.