I'm trying to do column visibility with grouping. I currently have:
$(document).ready(function() {
var table = $('#table1').DataTable( {
fixedHeader: true,
dom: 'Blftrip',
buttons: [
{
columns: [1,2,3,4,5] ,
extend: 'colvis',
text: 'Toggle Column Sets',
}
]
} );
} );
When I press the "Toggle Column Sets" button, it currently gives me the option of toggling each of the columns 1-5 individually. I want it so that when I press "Toggle Column Sets", it instead gives my an option to toggle [1,2] or [3,4,5] as groups.
What's the easiest way to do this?
Thanks.