fnDraw() doesn't refresh datatable after row is inserted successfully

fnDraw() doesn't refresh datatable after row is inserted successfully

ponpanponpan Posts: 1Questions: 0Answers: 0
edited April 2013 in General
I have Jquery datatable and I am using the following code, after inserting record, I would like to refresh datatable to display newly added record.

What is the best option to call fnDraw()? How can I call fnDraw() when save or ok button in pressed?

Code
[code]
$(document).ready(function () {
oTable = $("#projects").dataTable({ // error here
"bServerSide": true,
"sAjaxSource": "mycontroller",
"bProcessing": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true
}).makeEditable({
sAddURL: "addController"
});
$('#formAddNewRow').submit(function(e){
alert('refresh');
oTable.fnDraw();
});
});[/code]

Any help is highly appreciable.
This discussion has been closed.