[Need help] Uncaught TypeError: Cannot call method 'fnSetData' of undefined

[Need help] Uncaught TypeError: Cannot call method 'fnSetData' of undefined

xlwjroxlwjro Posts: 3Questions: 0Answers: 0
edited December 2011 in Bug reports
Hello,

I really like the examples from these datatables, however I can't get it to work.
I've tried 3 different versions;
1. The minified v1.8.2;
2. The full v1.8.2;
3. The minified v1.9 beta;

In all 3 versions I get this error:
Uncaught TypeError: Cannot call method 'fnSetData' of undefined
_fnSetCellDatajquery.dataTables.js:6711
_fnGatherDatajquery.dataTables.js:2849
$.fn.dataTablejquery.dataTables.js:7422
e.extend.eachjquery-1.7.1.min.js:2
e.fn.e.eachjquery-1.7.1.min.js:2
$.fn.dataTablejquery.dataTables.js:6923
(anonymous function)Global13.js:21
f.Callbacks.njquery-1.7.1.min.js:2
f.Callbacks.o.fireWithjquery-1.7.1.min.js:2
e.extend.readyjquery-1.7.1.min.js:2
c.addEventListener.B

Does anyone know what the problem is and how I can fix this?

Replies

  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    You are going to need to give us a lot more information than that - ideally a link to your test page :-).

    Are you using mDataProp in your initialisation? My guess is that one of those is a little off from what the data model is.

    Allan
  • xlwjroxlwjro Posts: 3Questions: 0Answers: 0
    Thankyou for your reply.

    I do the default initialisation:
    if ($("#tbl_TransactionItems").length) {
    $("#tbl_TransactionItems").dataTable();
    }

    Here is my table (I deleted the rows, because that's not really what you need to know):




    I load the jQuery Libraries first, datatables next.. And in Global I've the initialisation.




    I don't have a testpage which I can show right now, the page I've got is confidential. If this is still not enough information, then I guess I have to setup a testpage somewhere.
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    Okay in that guess I'm changing my guess to a missing cell in the table, or a rowspan / colspan in the tbody :-).

    But not, I'm afraid still not enough information to say exactly what is causing it. I'd need to see the table actually running I think.

    Allan
  • xlwjroxlwjro Posts: 3Questions: 0Answers: 0
    Thankyou very much, this has helped me. I was missing two , since those columns didn't have a header name, so now I added 2 empty and it works.

    Thankyou again.
This discussion has been closed.