문제

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

도움이 되었습니까?

해결책

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();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top