aLayout[(i + k)] is undefined

aLayout[(i + k)] is undefined

bidon2bidon2 Posts: 20Questions: 2Answers: 0

Hello,

I use DataTables v1.10.16 and got the error "aLayout[(i + k)] is undefined".
I googled a little bit and it's maybe because of my col- and rowspan in head.

Here is my HTML structure:

Thanks in advance!

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    Answer ✓

    It looks like you have a total of 23 columns in your header but only 17 in your table. The number of columns need to match. Take a look at this example:
    https://datatables.net/examples/basic_init/complex_header.html

    Kevin

  • bidon2bidon2 Posts: 20Questions: 2Answers: 0
    edited March 2018

    Edit: Ok, sorry guys. My mate did a wrong job with the rowspan. Of course it's not three but two!

    ---OLD---
    Thanks for your reply.
    There are exact 19 columns in my table.
    But I think your way is right. DataTables thinks I got only 17 columns.
    Do you have an idea how to tell DataTables that the rowspans of the first row belong to the second row?

    Here is my head:

    ---OLD---

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    Answer ✓

    Sorry, I added that last rowspan to the column total :smile:

    I looked at your header incorrectly. Looks like you have rowspan=3 but only define two header rows. I'm thinking that is the problem.

    Kevin

This discussion has been closed.