Want to print only the visible columns but always exclude the first column
Want to print only the visible columns but always exclude the first column
I'm using DataTables-1.10.12 and Buttons-1.2.2 -- Using the Buttons extension I want to print the visible columns but always exclude the first column, which is always visible. I use the 'colvis' button to set whether to rest of the columns are visible. This code for the Buttons used to work with previous versions:
{
extend: 'print',
exportOptions: {
columns: ':not(:first-child), :visible',
rows: ':visible'
}
},
{
extend: 'colvis',
columns: ':not(:first-child)',
titleAttr: 'Show or hide columns'
},
It no longer does. The first column does not print, but all the columns now do, regardless of their visiblilty.
Any help is appreciated.