Hi,
I'd like that the visibility of the displayed columns to be saved between user's sessions.
I tried with the "bStateSave": true options but it doesn't seems to be working.
Is there a way to achieve this?
That should work okay. Could you run your table over the debugger when the visibility has been changed and the page reloaded ( http://debug.datatables.net )? A link would be great as well.
I fought with a ColVis problem for a few hours because it was not loading the proper state. Each time I refreshed the browser it would default to all columns visible. I thought it may have been related to cookies so I converted to localState.
After much debugging I found the problem.
saved_aoColumns state was correct but it was somehow ignoring it.
fnDetectHeader and _fnGetUniqueThs look for a hardcoded "table header" with column values, if this does not exist, ColVis state will not work.
I've been using datatables without headers as it allows me more portability and less places to change things i.e: header, aocolumns, aocolumndefs.
Replies
Thanks,
Allan
After much debugging I found the problem.
saved_aoColumns state was correct but it was somehow ignoring it.
fnDetectHeader and _fnGetUniqueThs look for a hardcoded "table header" with column values, if this does not exist, ColVis state will not work.
I've been using datatables without headers as it allows me more portability and less places to change things i.e: header, aocolumns, aocolumndefs.
Leo