colvisRestore and savestate problem

colvisRestore and savestate problem

t0n1zzt0n1zz Posts: 32Questions: 19Answers: 0

hi, i am using colvisRestore to show all my column after i hide some of them... but because i am using savestate option... it not restore/show all column but just restore back to the last column set before i reload the page.... how to fix that? so that colvisrestore will always show all hide column?

This question has an accepted answers - jump to answer

Answers

  • F12MagicF12Magic Posts: 109Questions: 0Answers: 28
    Answer ✓

    Hi t0n1zz,
    this sounds to me as the default behavior of the button.
    You could add an extra "Show All" button like:

    "buttons": [
        {
            extend: 'colvis',
            text: 'Column Visibility',
            prefixButtons: [
                {
                    extend:'colvisGroup',
                    text:'Show all',
                    show:':hidden'
                },
                {
                    extend:'colvisRestore',
                    text:'Restore'
                }
            ]
        }
    ]
    
  • t0n1zzt0n1zz Posts: 32Questions: 19Answers: 0

    wow thank you it works!!!

This discussion has been closed.