Show/Hide selections not visible on page refresh

Show/Hide selections not visible on page refresh

codeturtlecodeturtle Posts: 3Questions: 1Answers: 0
edited June 2015 in Free community support

When columns are unselected from Show/Hide menu, they are not shown as selected when page is refreshed. I need all of my columns to be visible after a refresh of the page. If I remove this line { data: null, defaultContent: '', orderable: false }, they are all visible after page refresh; however, I then have a duplicate row of column headings.
Please help!

Thanks!

Answers

  • codeturtlecodeturtle Posts: 3Questions: 1Answers: 0

    Okay, to clarify. I have stateSave: true enabled to save the currently viewed data table. I need the selected/unselected table columns to persist across a page refresh. Can someone PLEASE direct me on this. I believe it may have something to do with using sessionStorage, but I'm new at this. Thank you, forever!

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Per the forum rules, please link to a test case showing the issue so we can debug it.

    Allan

  • codeturtlecodeturtle Posts: 3Questions: 1Answers: 0

    After testing was done, this issue was discovered to be caused by using the scrollX: true method. Removing this method solved the persistence across page refresh issue. Does anyone know of an alternative to using scrollX? Thanks!

    -Also, thank you Allan, for the quick response. You are awesome!

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Without a test case showing the issue, I'm afraid there is little help we can offer. Please link to the page or create a test case using JSFiddle or http://live.datatables.net .

    Allan

This discussion has been closed.