Button pdf export call function
Button pdf export call function
andrii.radkovskii
Posts: 20Questions: 0Answers: 0
How to make a custom export button? I used this code but it does not work.
Help me please.
<button type="button" class="btn btn-info" id="export-button-pdf">Export</button>
$("#export-button-pdf").on("click", function () {
table.button('.buttons-pdf').trigger();
});
This discussion has been closed.
Replies
Not sure I'm clear what you want. Is this what you are looking for?
https://datatables.net/extensions/buttons/custom
Kevin
@kthorngren
I want to create export button and place them anywhere where on html without using dom
This doc may help:
https://datatables.net/extensions/buttons/#Direct-insertion
Kevin
I would like for example to put a button beyond the table, is it possible somehow to do it?
For an example, I will show how I did it with charts.
The direct insertion method I linked to uses the
buttons().container()
API to place the buttons. Thebuttons().container()
docs have an example. From that example I put together this example to show placing the buttons in adiv
.http://live.datatables.net/merosanu/1/edit
Kevin