Save ColVis as cookie or session variable?

Save ColVis as cookie or session variable?

BradleyBradley Posts: 1Questions: 0Answers: 0
edited October 2011 in Plug-ins
I have a table with 20 columns or so; all 20 columns show up on page load. I use ColVis to hide the columns that are irrelevant depending on what I'm looking for. Is there a way to save the ColVis state to a cookie or session variable?

Replies

  • versakversak Posts: 26Questions: 0Answers: 0
    I have "bStateSave":true set in the initial load of the datatables. i don't think it takes extra configuration, however, I've noticed that after loading the page with the cookie, the RESTORE COLUMNS button no longer works and you have to restore them one by one.

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "bStateSave":true
    } );
    } );
    [/code]
This discussion has been closed.