DataTables warning: Requested unknown parameter

DataTables warning: Requested unknown parameter

PaulBartunekPaulBartunek Posts: 2Questions: 0Answers: 0
edited March 2012 in DataTables 1.9
I'm getting the following error:
DataTables warning (table id = 'DocumentTypeTable'): Requested unknown parameter '0' from the data source for row 0

The table appears to display correctly after hitting ok but of course doesn't function very well (constant errors, etc).
I've ran your debug bookmarklet and got the code ikiduz.

I've examined the json object etc and can't seem to find the issue.

Any help is appreciated!

-Paul

Replies

  • PaulBartunekPaulBartunek Posts: 2Questions: 0Answers: 0
    I should mention that this table functions fine (as far as I can tell) with dataTables 1.8.2
    -Paul
  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Ah - took me a minute to realise what was going on. Thanks for using the debugger btw :-).

    Basically fnRender has been modified slightly in 1.9 to give you a second parameter - the value of the cell (since that was the most common thing to use in fnRender). However, you don't have a value for that cell - it doesn't exist - hence the error and why it now appears.

    The solution is to use sDefaultContent for your first two columns. Just set it to be an empty string and that should do it :-)

    Allan
This discussion has been closed.