title: How to disable column toggle for particular column of Datatable when it is hidden?
body: <p>I am using Datatable plugin for my project. I have enabled colvis feature to help the table export. Now I want to hide few of the columns for a user using below script:</p>
  
  <pre><code> columnDefs : [
    { targets: 1, visible: (department == '6')||(department == '0'),
     "searchable": false,className:'none' }
  ]
  </code></pre>
  
  <p>It works fine like column is hidden and it's not searchable too. But since I enabled colvis ,  the column name is visible in the list and when user selects hidden column, it will be displayed. Can any one suggest me how could I disable column toggle too ?</p>
  
  <p>also tried specifying the column to exclude colvis but no use.</p>
  
  <pre><code>columnDefs : [
    { targets: 1, visible: (department == '6')||(department == '0'),
     "searchable": false,className:'never', responsive: false ,colVis: {
      exclude: [ 1 ]
  }},
  
  ],
  </code></pre>
  
  <p>and below is my comple te datatable script.</p>
  
  <pre><code> $('#page_effect').fadeIn(2000);
                  var table = $('#testTable').DataTable({
                      mark: true,
                      responsive: true,
                     "dom": 'flit',
                      columns: [
                          {className: "group1"},
                          {className: "group2"},
                          {className: "group1"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                          {className: "group2"},
                      ],
                      dom: 'Bfrtip',
                      buttons: [{
                              extend: 'collection',
                              text: "More options",
                              buttons: [
                                  'pageLength',
                                  {
                                      extend: 'copyHtml5',
                                      exportOptions: {
                                          columns:  ':visible'
                                      }
                                  },
                                  {
                                      extend: 'excelHtml5',
                                      title: 'Book',
                                      exportOptions: {
                                          columns: ':visible'
                                      }
                                  },
                                  {
                                      extend: 'pdfHtml5',
                                      title: 'Book',
                                      exportOptions: {
                                          columns: ':visible'
                                      }
                                  },
                                  {
                                      extend: 'print',
                                      title: 'Book',
                                      exportOptions: {
                                          columns: ':visible'
                                      }
                                  },
                                  {
                                      extend: 'excel',
                                      title: 'Book',
                                      text: 'Export selected',
                                      exportOptions: {
                                          columns: ':visible',
                                          modifier: {
                                              selected: true
                                          }
                                      }
  
                                  },
                                  {
                                      extend: 'columnToggle',
                                      text: 'Toggle Group1',
                                      columns: '.group1'
                                  },
                                  {
                                      extend: 'columnToggle',
                                      text: 'Toggle Group2',
                                      columns: '.group2'
                                  },
  
                                  'colvis',
  
                              ],
                          }],
                       dom: 'Bfrtip',
                        lengthMenu: [
              [ 10, 25, 50, 250 ],
              [ '10 rows', '25 rows', '50 rows', '250 rows' ]
          ],
          columnDefs : [
    { targets: 1, hidden: (department == '6')||(department == '0'),
     "searchable": false,className:'never', responsive: false ,
     buttons:[
                  {
              extend: 'colvis',
              columns: ':gt(0)'
          } ],
  },
  
  ],
                      scrollY: 300,
                      scrollX: true,
                      scrollCollapse: true,
                      paging: true,
                      fixedColumns: true,
                      select: true,          
  
                  });
  </code></pre>