You can't call the add
method without giving it the data for the new row. See this updated fiddle.
employersTable.row.add( [
'added row',
'Test 2',
123,
'2014-05-09',
'No',
'blub'
] ).draw();
Question
I tried to add a new row with new jQuery DataTable API
used by this example: http://datatables.net/examples/api/add_row.html, but have no idea why it's not working.
Here is a jsfiddle example showing what I'm trying to do: http://jsfiddle.net/cvLRg/
The error I am getting: TypeError: row is undefined
P.S.: DataTables Version 1.10.0
Solution
You can't call the add
method without giving it the data for the new row. See this updated fiddle.
employersTable.row.add( [
'added row',
'Test 2',
123,
'2014-05-09',
'No',
'blub'
] ).draw();