fnAddData

fnAddData

whoopeswhoopes Posts: 9Questions: 0Answers: 0
edited March 2010 in General
I'm ready to jump out a window. I hope someone much smarter than I, can help.

I have a table:
[code]




Shop Order


PAA








[/code]

Here's my javascript:
[code]
var oPAATable;
$(document).ready(function() {
oPAATable = $("#SOPAAtbl").dataTable({
"aoColumns": [
{ "sName": "SO" },
{ "sName": "PAA" }]
});
});
[/code]
I'm trying to add data to the table using the following:
[code]
oPAATable.fnAddData('[ [ "r1col1val", "r1col2val"], ["r2col1val","r2col2val"]]');
[/code]

And I receive the following error: "DataTables warning: Added data does not match known number of columns"

Can someone point me in the right direction?

Replies

  • whoopeswhoopes Posts: 9Questions: 0Answers: 0
    Nevermind, I'm an idiot.

    oPAATable.fnAddData([ [ "r1col1val", "r1col2val"], ["r2col1val","r2col2val"]]);

    Sorry if I wasted even a nanosecond of your time.
This discussion has been closed.