Dynamic table with FixedColumns Issue

Dynamic table with FixedColumns Issue

jnorrisjnorris Posts: 25Questions: 0Answers: 0
edited October 2011 in DataTables 1.8
I'm trying to dynamically re-create a table that uses the FixedColumns extra. Basically, I'm calling fnDestroy() on the datatable object, replacing the table html in the DOM, creating a new datatable object and finally creating a new FixedColumn object. This is causing a webpage error at line 566 in the fixedColumn javascript file. The width() function on the grid returns 0 so the calculated width ends up being negative. The functionality still seems functional though.

Can anyone point me out to what I should be doing to remove an existing datatable and replace it with a new one? Does fnDestroy() also destroy any other "extras" objects attached to the datatable object? I didn't see any way to directly destroy the fixedcolumn object.

Replies

  • jnorrisjnorris Posts: 25Questions: 0Answers: 0
    I've experimented with this a bit. If I don't apply the FixedColumn to the datatable everything works as I would expect it to without any page errors. I think the FixedColumn object is left behind when the datatable object is destroyed and is still responding to resize events except the datatable object it was initialized with no longer exists. The fixed column for the new table appears to be applied since it is functional with the new datatable.
This discussion has been closed.