Lost formatting after updating table headers from ajax request

Lost formatting after updating table headers from ajax request

thomaswfrythomaswfry Posts: 2Questions: 2Answers: 0

Here's the scenario:

I load up a form with some generic headers. I'd prefer to load no headers and just hide the datatable for now. The client fills out the form and based on what checkbox they select a different results set AND results header is returned. I don't know what the headers will be until after they submit the form. Once they submit i use a $("#resultsHeader").replaceWith() to update the header columns of the datatable. Now I lose all my datatable styles and nothing seems to work. I have tried fnDestroy() and fnUpdate and nothing seems to work.

you can see all my code at:

http://jsfiddle.net/j7mQd/

This discussion has been closed.