external buttons from the table

external buttons from the table

bestoffbestoff Posts: 1Questions: 1Answers: 0

Hi, I am creating copy, download (excel and pdf) buttons outside the table. I initialized datatable with buttons: ['copy'] and then hid it to make my buttons work. Is there a method to not put buttons: ['copy'] in js and still make the buttons go maybe through api? Thanks

Answers

  • allanallan Posts: 63,230Questions: 1Answers: 10,417 Site admin

    You mean you want to trigger the default action from your own custom button? See that is possible, you need to call the button's action function. There is an example for how to do that in the last example on this page.

    Another option would be to use the default buttons and then move them to wherever you want on your page.

    Allan

Sign In or Register to comment.