Datatables does not work when I12 is used
Datatables does not work when I12 is used
Link to test case:
Debugger code (debug.datatables.net):
#
working without colspan="2"
#
I0 | I1 | I2 | I3 | I4 | I5 | I6 | I7 | I8 | I9 | I10 | I11 | I12 | I13 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
#
not working with colspan="2"
#
I0 | I1 | I2 | I3 | I4 | I5 | I6 | I7 | I8 | I9 | I10 | I11 | I12 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
#
How I call datatables
#
var table_tr = $('#trial').DataTable({
"scrollY": "1000px",
"scrollX": true,
"scrollCollapse": true,
"paging": false,
"destroy": true,
"ordering": false,
"info": false,
"searching": false,
"processing": false,
"serverSide": false,
"select": {
style: 'multi',
items: 'cell'
},
"fixedColumns": {
leftColumns: 2
},
});
Error messages shown:
No error messages
Description of problem:
Datatables Version: 1.12.1
As codes shown above, as long as <th colspan="2">I12</th> is used, datatables does not work.
Could someone point out where I have done wrong?
Answers
Root cause found, it requires at least a layer of header with all colspan="1"
Thanks for posting back. In DataTables each column must have a unique header cell (a colspan of 1). They can be over multiple rows, but there must be at least one per column.
Allan