With aoColumns, bVisible only hides tbody columns

With aoColumns, bVisible only hides tbody columns

leurkleurk Posts: 5Questions: 0Answers: 0
edited April 2011 in Bug reports
Hello.

If I use following metadata to generate table, bVisible only hides tbody id column leaving thead column untouched.

aoColumnDefs visibility works as expected, but I want true per-field metadata rather than metadata with accompanying Defs block.

I use version 1.7.6 of DataTables.

Thanks.

Alexey

[
{
"bVisible":"false",
"sName":"id",
"sTitle":"id",
"sType":"string"
},
{
"sName":"date",
"sTitle":"date",
"sType":"date"
},
{
"sName":"cats",
"sTitle":"cats",
"sType":"string"
}
]

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Use "bVisible": false, rather than "bVisible": "false". You are giving it a string rather than a boolean at the moment. Not sure why that would effect the body differently from the header though! If you can post an example (if the suggested change doesn't help) that would be good.

    Allan
  • leurkleurk Posts: 5Questions: 0Answers: 0
    Thanks, allan. "bVisible": false did the trick.
This discussion has been closed.