Hidden columns missing from DOM
Hidden columns missing from DOM
I am starting up a dataTable with these options:
[code]
{
"oLanguage": {
"sEmptyTable": "Search Results"
},
"aoColumns": [
{ "mData": "pub_num" },
{ "mData": "vol" },
{ "mData": "chem_sys" },
{ "mData": "authors" },
{ "mData": "years" },
{ "mData": "id", "bVisible": false }
],
"aoColumnDefs": [
{ "sWidth": "55px", "aTargets": [ 0 ] }
// { "sWidth": "50px", "aTargets": [ 1 ] },
// { "sWidth": "30px", "aTargets": [ 4 ] }
],
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"bAutoWidth": false,
"sScrollY": "300px"
}
[/code]
I later populate the table with fnAddData(), passing it an array of json objects. My 6th column is totally missing from the DOM. This also seems to be the case in the 'Hidden Columns' example as well.
Any ideas?
[code]
{
"oLanguage": {
"sEmptyTable": "Search Results"
},
"aoColumns": [
{ "mData": "pub_num" },
{ "mData": "vol" },
{ "mData": "chem_sys" },
{ "mData": "authors" },
{ "mData": "years" },
{ "mData": "id", "bVisible": false }
],
"aoColumnDefs": [
{ "sWidth": "55px", "aTargets": [ 0 ] }
// { "sWidth": "50px", "aTargets": [ 1 ] },
// { "sWidth": "30px", "aTargets": [ 4 ] }
],
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"bAutoWidth": false,
"sScrollY": "300px"
}
[/code]
I later populate the table with fnAddData(), passing it an array of json objects. My 6th column is totally missing from the DOM. This also seems to be the case in the 'Hidden Columns' example as well.
Any ideas?
This discussion has been closed.
Replies
Either the behavior I'm expecting to see is not what is intended by bVisible or something is broken.
If you want the data from that column, you can use the fnGetData method.
Allan