bVisible: second row in thead doesn't get hidden

bVisible: second row in thead doesn't get hidden

dadodado Posts: 17Questions: 0Answers: 0
edited September 2009 in General
Hi Allan,

i run into trouble again and i'm not sure what to do.

Whenever i set a col to "bVisible": false, all of col disappears execpt of the cell with the selectbox. I saw that you wrote that this is fixed in 1.5.2, but even with upgrading the problem exists. Is there something wrong with my code?

regards
Daniel
[code]



ID
Region
Wert
foo
bar
foobar
barfoo
barbar
foofoo
FragenID
LabelID


Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen
Alle anzeigen





[/code]

Init is
[code]
ergebnisTab = $('#ergebnisse').dataTable( {
"aoColumns": [
{ // ID der OE
"sClass": "center"//,
//"iDataSort": 0
},
{ "iDataSort": 0 },
{ "sClass": "right" },
{ "sClass": "center" },
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "bVisible": false},
{ "bVisible": true}

],
"aaSorting": [ ], // Prevent initial sorting
"oLanguage": {"sUrl": "js/de_DE.txt"},
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"bProcessing": true,
"bSortClasses": true,
"bStateSave": false,
"sDOM": ''
[/code]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi dado,

    This is actually a limiation of the current version of DataTables. It does not currently remove the DOM elements for the hidden columns in anything other than the first row in the header and footer. This is on the to-do list to fix, but is non-trivial due to the ability to show and hide columns dynamically and also should it hide TD elements as well (I'm going for "yes" at the moment :-) ).

    So until there is a fix, I suggest just removing the DOM elements yourself with a simple removeChild() call after the table has been initialised.

    Regards,
    Allan
This discussion has been closed.