Colvis above table and Excel under it

Colvis above table and Excel under it

Mauro26Mauro26 Posts: 17Questions: 7Answers: 0

i have this code

        "dom": 'Bfrtip',
        "stateSave": true,
        "buttons": [{
            "extend": 'excelHtml5',
            "autoFilter": true,
            "sheetName": 'Exported data',
            "exportOptions": {
                    columns: '.show'
                }
        },
        {
            "extend": 'columnsToggle',
            columns: '.show'
        }],

I read about how to manage the position of the DOM with that property but i don't know if it's posible to have the export button separate from the columnsToggle buttons since both are under the B in the Dom. I was searching but i couldn't find anything to do this.
I want to leave all the buttons of the columns above the table and the button for export under the table.
Is there any way to do this?

Regards

Answers

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

    Hi @mauro26,

    You can create buttons separately, see example here. This would allow you to insert them into the DOM wherever you please.

    Cheers,

    Colin

This discussion has been closed.