Error with JQuery DataTables and ColVis plugin "Cannot read property 'sWidth' of undefined"

Viewed 21834

Using the jquery.datatables plugin with the ColVis addon, I recieve this error when I remove a column:

"Cannot read property 'sWidth' of undefined". I haven't been able to find a solution to this error online.

I'm not sure what's causing the error, although I do have a fix that I would like to post for the benefit of other's who run into this issue.

I'm using jquery.datatables 1.9.4 from http://datatables.net/.

4 Answers

Such error occurs just due to populating columns within

...DataTable(... "columns":... )

mismatch with the defined HTML page Have number of columns.

.. ..

Related