Simultaneously Toggle Some Columns On & Other Columns Off?
Simultaneously Toggle Some Columns On & Other Columns Off?

I would hope this would be an easy question to answer.
Say I have 12 columns, 0 - 7 are visible, 8-11 are hidden.
I have this code
{
extend: 'columnToggle',
text: 'Update',
columns: [8,9,10,11]
}
Can I show 8-11 while hiding 4,5,6,7 and toggle between visibility of those 8 columns?
This discussion has been closed.
Replies
See if this example does what you want.
Kevin
Thank you, but it is not. In the link you sent me there are 3 buttons. I only want 1 button.
I have 12 columns. 1 - 8 are visible. 9 - 12 are hidden.
Click the button (only 1) and 4-8 get hidden, and 9-12 are visible.
Click the button again, 4-8 are visible, 9-12 are hidden.
Just one button....toggling an alternating group of buttons
You could do something like the
Married
button in this example. In that example it's filtering, but you could use the same framework to add calls tocolumns().visible()
for your logic,Colin
Thank you, very much appreciated.