Added data does not match known number of columns

Added data does not match known number of columns

todd.brunertodd.bruner Posts: 3Questions: 0Answers: 0
edited April 2010 in General
I'm receiving this error: Added data does not match known number of columns
and I can't find my problem. The table has 5 columns, and the aaData has 5 columns.
DataTables version (1.6)
Any help would be greatly appreciated...

The table is defined in HTML thusly:
[code]



Select
Subject
Owner
Opened
Status





[/code]
The Javascript for DataTables is:
[code]
$(document).ready(
function() {
$("#event_select_table").dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/scot/event?command=retrievejson"
});
}
);
[/code]
the Ajax call returns the following json:
[code]
{
"iTotalDisplayRecords" : "1",
"iTotalRecords" : "1",
"aaData" : [
"",
"Sluggo! ",
"tbruner",
"2010-04-07 14:56:21",
"open"
],
"sEcho" : "1"
}
[/code]

Todd

Replies

  • todd.brunertodd.bruner Posts: 3Questions: 0Answers: 0
    edited April 2010
    Stupid error in the aaData, just caught it. Sorry about the post, eyes crossing after long day!

    the correct json looks like:
    [code]
    {
    "iTotalDisplayRecords" : "1",
    "iTotalRecords" : "1",
    "aaData" : [
    [
    "",
    "Sluggo! ",
    "tbruner",
    "2010-04-07 14:56:21",
    "open"
    ]
    ],
    "sEcho" : "1"
    }
    [/code]
This discussion has been closed.