redesign and reposition the buttons

redesign and reposition the buttons

taotao2taotao2 Posts: 2Questions: 1Answers: 0

Hello,
I'm trying to integrate datatable for an xlsx export from an html table.
How can I redesign and reposition the buttons?
I don't know how to address them, I don't think they have an id either or can I do an xlsx export (download) without these buttons?
greetings

Answers

  • maidenmaiden Posts: 16Questions: 6Answers: 0

    Hi,
    this is done by using a line of code like this
    "dom": '<"top"Bf>rt<"bottom"ilp><"clear">',
    Have a look at the reference for details: https://datatables.net/reference/option/dom

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Yep, as @maiden said, you can use dom, or you can attach the buttons to an object - see example here.

    Colin

  • taotao2taotao2 Posts: 2Questions: 1Answers: 0

    Unfortunately I do not understand that. My knowledge is probably not sufficient for that. The button disappears as soon as I address it to my table:
    $ ('# mytable'). DataTable ({

    Do you have a simple example where you create the button with a red background and move the position, maybe I could understand better.

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    There is an example of placing the buttons at the HTML element you want in this thread.

    Kevin

This discussion has been closed.