fnGetData() actual content of table
fnGetData() actual content of table
joeyPablo
Posts: 1Questions: 1Answers: 0
I'm trying to get the content of my table after I edit it but when i check what i get by using fnGetData() is the old content :/ ?
Am i missing something ? ( btw i'm using DataTables v1.10.8 )
function save(){ // it's the function i call after editing the table rows by submiting
var tableContent = $('#editableTable').dataTable();
console.log(tableContent.fnGetData()); // here I get the old content
$.ajax({
type : "POST",
url : "ajax",
dataType : 'json',
data : {
json : JSON.stringify(tableContent.fnGetData())
}
});
}
This discussion has been closed.
Answers
data()
orrows().data()
is how I would recommend you do it with 1.10. You can use fnGetData but it is legacy and will be removed in the next major version.However, they will give you basically the same data as the legacy method so there is something else going on. We'd need a link to the page, as required in the forum rules.
Allan