How to customise any button to work as(pdf/excel)
How to customise any button to work as(pdf/excel)
I made a data table and everything is good but I want to make the CVS/pdf button in another button(default is in the header), is there any way to customize any button work as those buttons
This question has an accepted answers - jump to answer
Answers
This thread should help, it's asking the same thing (and here too).
Cheers,
Colin
it is not useful can you help me
The second thread Colin linked to has the simple answer:
Then use
button().trigger()
in your button click event to trigger the appropriate Datatables button.If you still need help then please provide a running test case showing the layout you have in your screenshot. We can then provide specific code, for your solution, to show you what to do.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Here's a working example of that - calling
button().trigger()
to call the button's action script.Colin