Unable to save state of Hidden/Displayed columns (using ColVis) in DataTables.

Unable to save state of Hidden/Displayed columns (using ColVis) in DataTables.

salman_kagzisalman_kagzi Posts: 12Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
I have modified the ConVis plugin to serve some of the Needs of My application. At first I thought that my changes could have had created a bug in the State Saving of Visible Columns in the table. But then I realized that State Saving is a part of DataTables (where I do not have any changes) and not ColVis.

Upon deep diving into the Code, I found that function _fnCreateCookie (responsible for saving the state to Cookies) seems to be working fine and creating proper values for variable sFullCookie and saving it to document.cookie
But, when I went into function _fnReadCookie (responsible for reading the Cookies) the details that were saved are not available here at all. And it seems that they are also not present in document.cookie as well. I have reached my limited knowledge on JavaScipt now and am unable to go further. :(

Allan Can you please help. Is it a bug with DataTables or am I doing something really really stupid here? :(

I am unable to get a working link available, but have created Debug Data. Debug code is uyusuv

If you can provide me with some pointers here, I can dig in further.

Also, Is there any particular reason why you are not using jQuery Cookies plugin? It seemed very simple to use to me.

Replies

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    With the latest versions of ColVis and DataTables this should work just fine. ColVis shouldn't use the state saving options of DataTable at all - it should just work. Can you update to the latest 1.9.1.dev version of DataTables please (on the downloads page) and just check with that?

    > Also, Is there any particular reason why you are not using jQuery Cookies plugin?

    Yes - I didn't want DataTables to have a dependency on anything but jQuery.

    Allan
  • salman_kagzisalman_kagzi Posts: 12Questions: 0Answers: 0
    :( Eventually I was doing that after posting this question. But it didn't work either :(

    Debug data after updating the Scripts to nightly builds adoqam
  • salman_kagzisalman_kagzi Posts: 12Questions: 0Answers: 0
    FYI. I have also started getting an Error in TableTools after Updating to nightly build. Details available in a new Discussion @ http://datatables.net/forums/discussion/9449/is-there-a-change-to-flash-movie-in-the-nightly-build-of-table-tools
This discussion has been closed.