Cannot call method 'fnSetData' of undefined while fnUpdate

Cannot call method 'fnSetData' of undefined while fnUpdate

indapublicindapublic Posts: 2Questions: 0Answers: 0
edited July 2013 in General
Hello, everyone!
I have this code:

[code]
$.post('myurl', params, function(response) {
if (response.result == 'success') {
if (params.id == undefined) {
$('#table-customers').dataTable().fnAddTr($(response.row_html)[0]);
} else {
$('#table-customers').dataTable().fnUpdate($(response.row_html)[0], 0); // 0, for example. Table have two rows currently
}
}
});
[/code]

If I execute fnAddTr - all fine. If I execute fnUpdate - I receive message "Uncaught TypeError: Cannot call method 'fnSetData' of undefined" in console. What am I doing wrong?
This discussion has been closed.