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

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

edited December 2011 in Bug reports Posts: 3

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
(anonymous function)Global13.js:21

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


  • Posts: 22,734
    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.

  • Thankyou for your reply.

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

    Here is my table (I deleted the rows, because that's not really what you need to know):
    <table id="tbl_TransactionItems">


    I load the jQuery Libraries first, datatables next.. And in Global I've the initialisation.
    <script type="text/javascript" language="javascript" src="http://localhost.mws.nl:9000/Includes/Javascript/jquery-1.7.1.min.js"></script>;
    <script type="text/javascript" language="javascript" src="http://localhost.mws.nl:9000/Includes/Javascript/jquery.dataTables.js"></script>;
    <script type="text/javascript" language="javascript" src="http://localhost.mws.nl:9000/Includes/Javascript/Global13.js"></script>;

    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.
  • Posts: 22,734
    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.

  • Thankyou very much, this has helped me. I was missing two <th>, since those columns didn't have a header name, so now I added 2 empty <th> and it works.

    Thankyou again.
This discussion has been closed.