ColVis script error for column exclusion feature
ColVis script error for column exclusion feature
huangm777
Posts: 7Questions: 0Answers: 0
Hi,
I think I found an issue with the ColVis extra. When I try to activate the Show/Hide Columns button on the example site (http://www.datatables.net/release-datatables/extras/ColVis/exclude_columns.html) itself, I get the following error:
[quote]Error: this.dom.buttons[i] is null
Source File: http://www.datatables.net/release-datatables/extras/ColVis/media/js/ColVis.js
Line: 689[/quote]
I found this out after trying out the same code in my own project and it throws the same error. Please let me know how it might be fixed. Thanks.
Michael Huang
I think I found an issue with the ColVis extra. When I try to activate the Show/Hide Columns button on the example site (http://www.datatables.net/release-datatables/extras/ColVis/exclude_columns.html) itself, I get the following error:
[quote]Error: this.dom.buttons[i] is null
Source File: http://www.datatables.net/release-datatables/extras/ColVis/media/js/ColVis.js
Line: 689[/quote]
I found this out after trying out the same code in my own project and it throws the same error. Please let me know how it might be fixed. Thanks.
Michael Huang
This discussion has been closed.
Replies
Thanks,
Allan
"this.dom.buttons[i] is null" -> this.dom.buttons[i].style.width = "auto";
So I added null checks when resizing the buttons and it solved the problem.
I have a recent version of ColVis, but I'm gonna guess that there's a new one out already that has this fixed.
Anyway, Me and my colleagues love the extra ColVis. I've got tables with at least 40 columns and sometimes we don't want to look at all of them!
Simple, and effective.