User-1174608757 posted
Hi polachan,
According to your code , column 1 and column 2 couldn't be hidden because you have defined below:
"columnDefs": [
{"className": "dt-center", "targets": "_all"}
This will cover the code you set to column 1 and 2 , so I suggest that you could write as below:
"columnDefs": [
{
"targets": [ 1 ],
"visible": false
},
{
"targets": [ 2 ],
"visible": false
},
{
"targets":[0,3,4,5,6],
"className":"dt-center"
}
],
You could see the result:
Best Regards
Wei