Error while destroying table with hidden column
Error while destroying table with hidden column

Hi,
I am facing an error when I try to destroy the table having one of the column visibility as false. Same as here: https://datatables.net/forums/discussion/30070/destroy-table-troubles-with-hidden-columns
Is there a solution to it?
This discussion has been closed.
Answers
The error I was receiving was: Cannot read property 'style' of undefined.
I had not added the <th></th> element for the hidden column earlier. Adding that resolved this for me.
Hi @Wamakshi ,
I just tried it here, and it's working as expected and not generating the error. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin
Hi @colin
I wasn't able to replicate the exact error in your example here http://live.datatables.net/surawice/5/edit
But, that was my use case - I needed data to be present for that column (whose value was used in rendering another column's data), but not be visible in html. Here's my example with that error:
https://jsbin.com/vozapez/edit?html,js,console,output
Thanks
You define three columns in your js, but there are only two in your HTML. They have to match.