Reputation: 2101
I have rendered a hidden column using the fnRender function like this
"aTargets": [0],
"fnRender": function ( oObj ) {
return '<input id="test" name="test" value="'+ oObj.aData[0] +'" type="hidden" />';
}
and under aoColumns
have defined null
for it.
Now this field shows up as a column in the Datatables, which I do not want.
I tried the attribute bVisible:false
, but that also removes it from rendering , hence I am unable to get the value from the hidden field.
Please help.
Upvotes: 1
Views: 4422
Reputation: 2101
Did a workaround , clubbed the value of the hidden field with a visible field with a expression "#" in between.
Performing a split on the String retrieved to get the value of the hidden field.
Upvotes: 0
Reputation: 38147
You need to hide the first column only :
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [0]}
]
Upvotes: 4