Hidden column reappears after refreshing table

Hidden column reappears after refreshing table

rimoore2rimoore2 Posts: 3Questions: 1Answers: 0

After updating table data and calling .draw(), a previously hidden column reappears intermittently. Any ideas what might be causing this? See the column to the far right.

Answers

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    How are you hiding the column? Are you using Datatables to hide it or some other method?

    Kevn

  • rimoore2rimoore2 Posts: 3Questions: 1Answers: 0

    Hi Kevin,

    I'm using .column(9).visibility(false) and calling .draw() after.

  • rimoore2rimoore2 Posts: 3Questions: 1Answers: 0

    Here is the code invoked when data is updated:

    this.search = this._grid.search();
                $('#table').DataTable(this.tableconfig).rows().invalidate().draw('page');
                this._grid = $('#table').DataTable().order([2, 'desc'], [5, 'asc']).draw();
                this._grid.search(this.search).column(9).visible(false).draw();
    
  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    Its hard for me to tell from the screenshot and code snippet what the problem might be. Can you post a test case showing the issue?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.