How to resolve the error 'TypeError: headerCells[i] is undefined'?

How to resolve the error 'TypeError: headerCells[i] is undefined'?

manashbmanashb Posts: 3Questions: 1Answers: 0

Hi,
I am using server side processing to display a table in my application. It is working fine. But when i add a new column to the existing table it throws the above error. I have checked data is loaded properly. Tried datatable.destroy() not working.

Answers

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    Sounds like the number of columns in the HTML and the Javascript don't match. But without a test case (per the forum rules) it is impossible to say for sure.

    Allan

  • manashbmanashb Posts: 3Questions: 1Answers: 0

    Table is created dynamically in JavaScript. From my debugging, i have found fnServerData function is not working.

  • manashbmanashb Posts: 3Questions: 1Answers: 0

    Resolved. It was from my side. Column index issue. Thanks for the response

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    We'd need a link to the page showing the issue to be able to debug it and offer any assistance. Happy to take a look if you link to the page.

    Allan

This discussion has been closed.