Horizontal and vertical scrolling not working
Horizontal and vertical scrolling not working
I have one table with horizontal and vertical scrolling working with DataTables 1.10.16 and I'm trying to build a second table on a different page and scrolling is not working. I have checked to make sure that jQuery and DataTables are loading from their respective CDNs and they are. I am using the same version of jQuery on both pages. I am using the same init code for both.
DataTables is adding the dataTable class to the table, but not the dataTables_wrapper or other divs.
Here's a reduced test case:
http://live.datatables.net/qapopufi/1/
Any idea why this isn't working?
By the way, on my test page (not the test case), the console in Firefox is displaying the following error:
TypeError: i is undefined jquery.dataTables.min.js:24:271
And in Chrome a different error:
Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined
at Ga (jquery.dataTables.min.js:24)
at M (jquery.dataTables.min.js:16)
at HTMLTableRowElement.<anonymous> (jquery.dataTables.min.js:16)
at jquery.min.js:2
at Function.map (jquery.min.js:2)
at n.fn.init.map (jquery.min.js:2)
at ma (jquery.dataTables.min.js:16)
at e (jquery.dataTables.min.js:92)
at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:92)
at Function.each (jquery.min.js:2)
These errors are not appearing with the other table that is working successfully and also don't appear in the test case. (?)
Answers
This is a result of using
colspan
in your rows:Datatables does not support
colspan
androwspan
in thetbody
of a table.Kevin