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_kagzi
Posts: 12Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
> 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
Debug data after updating the Scripts to nightly builds adoqam