Disable colvis buttons
Disable colvis buttons
Hello all,
I would like to disable toggle for some columns. I have found the a previous discussion on this matter (https://datatables.net/forums/discussion/51360/add-disabled-columns-to-colvis-buttons) but I can not figure out how to adept this to my way to create a custom button for the filter.
I have ceated an example of my code:
http://live.datatables.net/foninawe/41/edit
How can I disable toggle for column 4 and 5? (Sorry for asking the question again)
Best Regards
Ludwig
Answers
There is an example of excluding a column in the docs.
https://datatables.net/reference/button/colvis
Thanks Tangerine, can I make a button disabled in a similar way?
You can call
button().disable()
to disable specific buttons. Also, this example from this thread may help,Colin