Uncaught TypeError: Cannot read property 'nTh' of undefined

Uncaught TypeError: Cannot read property 'nTh' of undefined

rmatinenrmatinen Posts: 3Questions: 1Answers: 0

Hi,
I use datatable in my site and when i click button, data from database fill my datatable.
when i use addon for my datatable for example Select Row...
it addon doesnt work and in my inspect element has one error:
Uncaught TypeError: Cannot read property 'nTh' of undefined in jquery.dataTables.min.js:10
who can help me?
sorry! my english is not well!

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,511 Site admin
    Answer ✓

    That will happen if the number of columns defined in the HTML does not match the number you've defined in the Javascript (using columns or columnDefs).

    I would suggest checking that first.

    If that doesn't resolve the issue, please link to a test case showing the issue, as per the forum rules.

    Allan

  • rmatinenrmatinen Posts: 3Questions: 1Answers: 0

    Yes it works! Thank you!
    but another error apears:
    Uncaught TypeError: Cannot read property 'aDataSort' of undefined in jquery.dataTables.min.js:62

    another question: when errors apear in this file, dont work next javascript code(for example Select Row)?

  • allanallan Posts: 63,791Questions: 1Answers: 10,511 Site admin
    Answer ✓

    Can you link to the page so I can debug it please.

    Allan

  • rmatinenrmatinen Posts: 3Questions: 1Answers: 0

    yes i can, i send a message for you
    thank you

This discussion has been closed.