fnSetColumnVis, header of column is missing

fnSetColumnVis, header of column is missing

Luda AmebaLuda Ameba Posts: 11Questions: 0Answers: 0
edited October 2009 in Bug reports
There is some problem whit fnSetColumnVis function. Example if first column is on init "bVisible": false, and then is called the fnSetColumnVis(0 , true) the header is missing :-)
Live example http://www.nikolaloncar.com/test/ use chkbox to show/hide columns :-)

Luda Ameba


  • allanallan Posts: 58,882Questions: 1Answers: 9,474 Site admin
    Hi Luda,

    Thanks very much for point about this, and for your example - it made this bug much easier to trace! Yes indeed this is a bug in DataTables where it wasn't correctly assigning the sTitle attribute to dynamically created hidden columns. The fix for this will be made available in 1.5.3, which I hope to get out in the next few days - until then, if you want to include the fix in your own copy of DataTables 1.5.2, line 2231 (or there abouts), replace the 'else' block with:

    /* We don't have a header in the DOM - so we are going to have to create one */
    var nTr = document.createElement( "tr" );

    for ( i=0, iLen=oSettings.aoColumns.length ; i
This discussion has been closed.