ColVis script error for column exclusion feature

ColVis script error for column exclusion feature

huangm777huangm777 Posts: 7Questions: 0Answers: 0
edited August 2011 in Bug reports
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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Can you try the ColVis nightly from the downloads page please: http://datatables.net/download/ - it should be fixed there. If not can you link to your example showing the issue please, as it does work with the nightly for me.

    Thanks,
    Allan
  • huangm777huangm777 Posts: 7Questions: 0Answers: 0
    The nightly worked. Thanks!
  • ShadowScripterShadowScripter Posts: 2Questions: 0Answers: 0
    I also had the same problem, Firebug keep throwing this error:
    "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.
This discussion has been closed.