Restore toggled columns except for ones initially hidden
Restore toggled columns except for ones initially hidden

I'm using colvis and I've also created a button to show all the toggled off columns at once. However, a couple of columns are hidden on page load because they are in child rows and only needed for search purposes. The show all makes the originally hidden columns appear again. Is there a way to exclude these columns?
buttons: [
'colvis',
{
extend: 'columnVisibility',
text: 'Show All Columns',
visibility: true
}
],
If it's not possible I'll just remove the button. Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Easiest way is probably to use a custom button:
Allan
That seems to work perfectly Allan. Thanks a lot.