When working with column visibility you may wish to present a control to the end user that provides the ability to set various columns to both show and hide at the same time – allowing grouping to occur. The colvisGroup button type provides this ability for Buttons. The show and hide parameters of this button are both column-selector types defining the columns in the table that should be shown or hidden respectively. If a column is not defined in either, its visibility is not altered.
All Tables->Style->Column Groups
{
"extend": "colvisGroup",
"text": "Office info",
"show": [1,2,3],
"hide": [4,5,6]
},
{
"extend": "colvisGroup",
"text": "HR info",
"show": [1,4,5,6],
"hide": [2,3]
},
{
"extend": "colvisGroup",
"text": "Show all",
"show": ":hidden"
},