How to get ColReorder to work when using bDestroy and filling table again

How to get ColReorder to work when using bDestroy and filling table again

rvgrahamrvgraham Posts: 28Questions: 5Answers: 0

I'm using a lot of Single Page Applications these days, and I can get ColReorder to work fine with the default approach. Works great if the user closes their browser and re-opens the same page, or even if they press F5.

But I have buttons on many pages that change the criteria for the grid data and re-fill the grid from a new Ajax call, having the bDestroy attribute = true. When I do this the column order changes are lost. I have tried initializing ColReorder with the dom attribute or with the "new $.fn.dataTable.ColReorder..." approach.

I have tried using localStorage to reload the previous configuration, as well as many other approaches, but without success. Sorry to say I can't post a link and I'm totally stupid about how to put up a jsfiddle etc.

Thanks, Bob Graham

This discussion has been closed.