column visibility

column visibility

pat.thizypat.thizy Posts: 7Questions: 2Answers: 0

Hi have a problem with le button colvis

I set :
{
extend: 'colvis',
text: gettext('Column visibility'),
columns: 'th:nth-child(n+2)', // First column not hidden
},
like exemple in your documentation

and I define : stateSave: true,

When I remove uncheck some columns in the 'column visibility' list and refresh the page
The columns will not be in the 'column visibility' after refresh

This question has an accepted answers - jump to answer

Answers

  • pat.thizypat.thizy Posts: 7Questions: 2Answers: 0

    I think I found the issue :
    columns: ':not(:first-child)'

    Is it possible to set another back color for button colvis ?

  • kthorngrenkthorngren Posts: 20,342Questions: 26Answers: 4,775
    Answer ✓

    You can inspect the button element to see the selectors used to apply the styling. This example shows setting the colvis button background.
    https://live.datatables.net/hiruceha/1/edit

    Kevin

  • pat.thizypat.thizy Posts: 7Questions: 2Answers: 0

    Thanks, it's works

Sign In or Register to comment.