Hide a column
Hide a column
Hello,
I'm trying to hide the first column of my datatable. I don't need to display that information in that column but I need to consult for certain functions with javascript. My trouble is when I use the attribute:
"columnDefs": [
{
"targets": [ 0 ],
"visible": false
}
the column also remove of HTML DOM and I don't want that.
I already tried hidding with CSS but it's not working.
I would be really grateful if someone help me with this, please!
This question has an accepted answers - jump to answer
Answers
Just use
row().data()to get the data for the row (regardless of column visibility).Allan
Thank you, Allan
Hi Allan,
I'll try the method that you suggested but I couldn't get the data from the column.
I'd need a link to a page showing the issue to be able to offer any assistance with resolving it.
Allan