This is an old thread but still - I 'd like to share what I came up with at my own project. I needed basically the same thing - I wanted to span a header over 3 columns without beefing it up, keeping it in one row.
You saw the error because jQuery DataTables wants a single column for every field to assign handlers or whatever. We can get rid of the error by adding another header row with as many header columns as you wanted to span over. In my case, I added 3 header columns.
Now, the error is gone but the header looks horrendous. Looks unnecessary but set all the other top row header columns to span over 2 rows (rowspan).
And now, the "magic" - as our 2nd row header columns don't contain any information whatsoever, just hide them!
$(document).ready(function() {
$('#example').DataTable();
});
<script
src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<link href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet"/>
<table id="example" class="display" cellspacing="0" width="100%" style="text-align: center;">
<thead>
<tr>
<th rowspan="2">One</th>
<th colspan="2">Two and Three</th>
<th rowspan="2">Four</th>
<th rowspan="2">Five</th>
</tr>
<tr style="display:none">
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td> First data </td>
<td> Second data </td>
<td> Third data </td>
<td> Fourth data </td>
<td> Fifth data </td>
</tr>
</tbody>
</table>
Voila. This was the cleanest workaround I could produce, but it'll do.