Trying to update a row with fbUpdate
Trying to update a row with fbUpdate
Azaret
Posts: 17Questions: 2Answers: 0
Hi,
I want to update some rows on a datatable, when i try to update a specific cell it works perfectly, but when I try to send a whole object for update the row, it fails and the JS console return errors :
"j is undefined
..."==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,i=a.aoColumns.length;e
I want to update some rows on a datatable, when i try to update a specific cell it works perfectly, but when I try to send a whole object for update the row, it fails and the JS console return errors :
"j is undefined
..."==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,i=a.aoColumns.length;e
This discussion has been closed.
Replies
Allan
I'm using the last version of DataTables yes.
Actualy myId is the index of the record on the table from datatable.
In more details I'm doing like this :
$("' .datatable").each(function () {
var aData = $(this).dataTable();
for (key in data.records) {
var id = -1;
var oData = aData.fnGetData();
for (rec in oData) {
if (oData[rec].id == data.records[key].id)
id = rec;
}
if (id >= 0) {
aData.fnUpdate(data.records[key], id);
}
}
});
Where data.records is the set of records I would to update in my datatable.
I'm not sure of how to use TR node, I want to update all DataTable records, and not only those shown.
I HAD similar problem - just solved it.
For whatever (important) reason I converted the node id to string and had this error.
parseInt did the job.
BTW great work allan - would you be so kind and have a look at my other post?
http://datatables.net/forums/discussion/comment/30340#Comment_30340