Horizontal and vertical scrolling not working

Horizontal and vertical scrolling not working

treebeardtreebeard Posts: 1Questions: 1Answers: 0

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

  • kthorngrenkthorngren Posts: 21,304Questions: 26Answers: 4,947

    Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined

    This is a result of using colspan in your rows:

    <tr>
    <th>Audio Output</th>
    <td colspan="4">40W (@ 14VDC per 100W speaker)</td>
    </tr>
    

    Datatables does not support colspan and rowspanin the tbody of a table.

    Kevin

This discussion has been closed.