fnAddData returns null on empty table
fnAddData returns null on empty table
markdl
Posts: 2Questions: 0Answers: 0
Hi,
I'm a newbie on using DataTables. I have this table where you can add and delete the rows. I'm using fnAddData() and fnDeleteRow() to add and delete data. During initialization of table using ajaxsoruce, works fine. Adding new data also works. But when the table is already empty, fnAddData fails with the error "nTrs[iRow] is null".
Does fnAddData() requires a non empty table?
I'm not quite sure if I'm doing the correct way of deleting and adding new data to the table.
Please help. Thanks!
I'm a newbie on using DataTables. I have this table where you can add and delete the rows. I'm using fnAddData() and fnDeleteRow() to add and delete data. During initialization of table using ajaxsoruce, works fine. Adding new data also works. But when the table is already empty, fnAddData fails with the error "nTrs[iRow] is null".
Does fnAddData() requires a non empty table?
I'm not quite sure if I'm doing the correct way of deleting and adding new data to the table.
Please help. Thanks!
This discussion has been closed.
Replies
Allan
I guess having the 3rd parameter of fnDeleteRow to false would be good for me.
Thanks!