DataTables/ColVis — pull request #15 by dustinrc (2013-02-14 19:52:29+00:00)
Title:  Enable grouping of columns for show/hide

I have the same requirement as:

http://datatables.net/forums/discussion/8052/colvis-multiple-columns-hiding

Per the developer's configuration, adds 'group buttons' for showing and hiding multiple columns at one time. The 'indeterminate' property is used on the group button when not all columns within the grouping are the same checked state.

It can be configured as such:

$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [ 0, 3 ],
"aoGroups": [
{
"sTitle": "Engine",
"aiColumns": [ 0, 3 ]
},
{
"sTitle": "Client",
"aiColumns": [ 1, 2 ]
}
]
}
} );
} );