Added data does not match known number of column

Added data does not match known number of column

handbuchhandbuch Posts: 55Questions: 0Answers: 0
edited October 2010 in General
Hi im getting the error: DataTables warning (table id = 'tblFood'): Added data (size 4) does not match known number of columns (10)

My JSON got 10 columns. My Table got 10 Columns. I dont use the 11. index of the obj or anything liek that. I rly dont get it.

My JSON: {"aaData":[[["8","e","e","1","1","1","1","11","1","8"],["7","w\u00f6llllllllllllll","w","1","1","1","1","1","1","7"],["9","asd","","","","","0","0","0","9"],["10","asd","","","","","0","0","0","10"]]]}
Script: http://pastebin.com/BpniJLyN

Line 32. begins the maintable.

Normaly i got too much column or soemthign but this time i dont see anything.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You've got an array of arrays of arrays (3D) in aaData there, not an array of arrays (2D) which DataTables requires. Your second array which DataTables is looking at has 4 elements - hence the error.

    Allan
  • handbuchhandbuch Posts: 55Questions: 0Answers: 0
    oh, yeah....sry,i really didnt see that. but thanks a lot!
This discussion has been closed.