Buttons: Column Visibility

Buttons: Column Visibility

sjw01sjw01 Posts: 67Questions: 36Answers: 1

I have it working ok: http://live.datatables.net/lidequra/8/edit

Based on this example: https://datatables.net/extensions/buttons/examples/column_visibility/stateSave

Is there anyway to add "Toggle All" ?

This question has an accepted answers - jump to answer

Answers

  • wujingjingwujingjing Posts: 10Questions: 4Answers: 1
    edited May 2018 Answer ✓

    Try to use
    buttons: [
    {extend: 'colvisGroup', text: 'show', show: ':hidden'},
    {extend: 'colvisGroup', text: 'hide', hide: '.noVis'},

  • sjw01sjw01 Posts: 67Questions: 36Answers: 1

    @wujingjing Thanks.

    Got it working: http://live.datatables.net/lidequra/9/edit

    New problem: When I reset the columns visibility - all of a sudden the width of the table is > 100% - Is there any solution for that?

    Also - small one: the "Reset Cols" button appears depressed (already selected) - can this behavior be avoided?

This discussion has been closed.