Dynamically Hiding Columns from the Hide/Show List

Dynamically Hiding Columns from the Hide/Show List

shawnfostershawnfoster Posts: 5Questions: 0Answers: 0
edited August 2012 in General
I have a data table that has already been initialized and I would like to dynamically hide columns from the hide/show list of the table. When initialized, it is easy to set this using the aiExclude setting. But how to I then access my data table and change this setting on the fly?


Thanks in advance.

Shawn

Replies

  • shawnfostershawnfoster Posts: 5Questions: 0Answers: 0
    edited August 2012
    Here is what I am trying to do now.

    [code]

    var oTable = $('#myTable').dataTable();
    var settings = oTable.fnSettings();
    settings.aiExclude = [3];

    [/code]
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Currently it is not possible to dynamically change the exclude list of ColVis. A few changes would need to be made to the code to publically expose that.

    Allan
  • shawnfostershawnfoster Posts: 5Questions: 0Answers: 0
    It would be a huge help if this was possible. :) Perhaps an idea for a future update? :)
This discussion has been closed.