Edit in JSFiddle

$(document).ready(function (){
   var table = $('#example').DataTable({
      'ajax': 'https://gyrocode.github.io/files/jquery-datatables/objects.json',
      'orderFixed': [3, 'asc'],
      'rowGroup': {
         'dataSrc': 'office',
         'startRender': function(rows, group) {
            // Assign class name to all child rows
            var groupName = 'group-' + group.replace(/[^A-Za-z0-9]/g, '');
            var rowNodes = rows.nodes();
            rowNodes.to$().addClass(groupName);
            
            // Get selected checkboxes
            var checkboxesSelected = $('.dt-checkboxes:checked', rowNodes);
            
            // Parent checkbox is selected when all child checkboxes are selected
            var isSelected = (checkboxesSelected.length == rowNodes.length);
            
            return '<label><input type="checkbox" class="group-checkbox" data-group-name="' 
                   + groupName + '"' + (isSelected ? ' checked' : '') +'> ' + group + ' (' + rows.count() + ')</label>';
         }         
      },
      'columns': [
         {
            'data': 'id',
            'checkboxes': {
               'selectRow': true
            },
            'render': function(data, type, row, meta){
               data = '<input type="checkbox" class="dt-checkboxes">'
               if(row['position'] === 'Software Engineer'){
                  data = '';
               }
            
               return data;
            },
            'createdCell': function (td, cellData, rowData, row, col){
               if(rowData['position'] === 'Software Engineer'){
                  this.api().cell(td).checkboxes.disable();
               }
            }
         },
         { 'data': 'name' },
         { 'data': 'position' },
         { 'data': 'office' },
         { 'data': 'salary' }
      ],
      'select': {
         'style': 'multi'
      },
      'order': [[2, 'asc']]
   } );
     
   // Handle click event on group checkbox
   $('#example').on('click', '.group-checkbox', function(e){
      // Get group class name
      var groupName = $(this).data('group-name');
      
      // Select all child rows
      table.cells('tr.' + groupName, 0).checkboxes.select(this.checked);
   });

   // Handle click event on "Select all" checkbox
   $('#example').on('click', 'thead .dt-checkboxes-select-all', function(e){
      var $selectAll = $('input[type="checkbox"]', this);      
      setTimeout(function(){
         // Select group checkbox based on "Select all" checkbox state
         $('.group-checkbox').prop('checked', $selectAll.prop('checked'));
      }, 0);
   });     

} );         
<h3><a target="_blank" href="https://www.gyrocode.com/projects/jquery-datatables-checkboxes/">jQuery DataTables Checkboxes:</a> <a target="_blank" href="https://www.gyrocode.com/projects/jquery-datatables-checkboxes/examples/integration/rowgroup/">RowGroup</a> <small>Disable checkboxes on page load</small></h3>
    
<table id="example" class="display" cellspacing="0" width="100%">
   <thead>
      <tr>
         <th></th>
         <th>Name</th>
         <th>Position</th>
         <th>Office</th>
         <th>Salary</th>
      </tr>
   </thead>
   <tfoot>
      <tr>
         <th></th>        
         <th>Name</th>
         <th>Position</th>
         <th>Office</th>
         <th>Salary</th>
      </tr>
   </tfoot>
</table>

<hr><a target="_blank" href="https://www.gyrocode.com/projects/jquery-datatables-checkboxes/examples/integration/rowgroup//">See full article on Gyrocode.com</a>