How to customise any button to work as(pdf/excel)

How to customise any button to work as(pdf/excel)

bbnnmm500bbnnmm500 Posts: 2Questions: 1Answers: 0

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

  • colincolin Posts: 12,453Questions: 0Answers: 2,110
    Answer ✓

    This thread should help, it's asking the same thing (and here too).

    Cheers,

    Colin

  • bbnnmm500bbnnmm500 Posts: 2Questions: 1Answers: 0
    edited July 1

    it is not useful can you help me

  • kthorngrenkthorngren Posts: 13,584Questions: 25Answers: 3,197
    edited July 1

    The second thread Colin linked to has the simple answer:

    All I had to do is change the dom option of the Datatable from this Bfrtip to frtip to hide it

    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

Sign In or Register to comment.