I have the following definition for my first five columns(there are many more than that):
"columns": [
{
"data": "HasOwnerHistory"
, "orderable": false
, "visible": false
, "className": 'notToggleVis'
},
{
"data": "HasServiceHistory"
, "orderable": false
, "visible": false
},
{
"data": "InForService"
, "orderable": false
, "visible": false
},
{
"data": "Project"
},
{
"data": "IsPartOfConfig"
, "orderable": false
},
The columns display/don't correctly.
I have the following in the DataTable to display ColVis
, buttons:
[
{
"extend": 'colvis'
, "columns": ':not(.notToggleVis)'
}
] //end buttons
The ColVis button shows up correctly. However, no matter what I try for the columns, I can not get a single column to disappear from the list.
I've tried (columns: ':not(:first-child)') from the following discussion:
https://datatables.net/forums/discussion/35949
Didn't work.
My goal is to remove the first four columns from the ColVis list. I would have thought this would be easy but obviously, I've missed something. The first three columns are used to generate another column and are "meaningless" for the end user.