DataTables logo DataTables

via Ad Packs
Bug with nested tables
  • I'm using DataTables to display a list of alert messages in a monitoring application. I'm currently adding a new column which contains another table with detailed information, depending on the type of alert. While doing so, I found that there's a bug in nested tables support.

    Everything works fine if the nested table is a simple table->tr->td structure, but if I markup the first line as <thead>, everything breaks. The Firebug console contains a warning message:

    DataTables warning (table id = 'alertstable'): Unexpected number of TD elements. Expected 10400 and got 900. DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.

    And then it fails at
    nCell.parentNode.removeChild( nCell );
    with "nCell is undefined".

    I could narrow down the condition under which the bug appears to: only when there is a <thead> element in the nested table, and this <thead> element contains <td> elements.

    My workaround therefore is to use <th> elements instead of <td> in the <thead>.

    According to our version control log, the DataTables version in our development environment is 1.8.2. I'm using an up-to-date Firefox with Firebug.
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.