fnGetData extended when using deep property reading for a data source (similar to Thread ID 4988)
fnGetData extended when using deep property reading for a data source (similar to Thread ID 4988)
jamjon3
Posts: 22Questions: 0Answers: 0
I'm using an array of objects to build datatables but I'm seeing the results of this function is returning an array rather than the source object. May have misunderstood this in the developer enhancements but that would be very helpful to get back that single object.
I'm prepping a button to delete a selected row so this is the event tied to that button (which later will have an AJAX call to handle that and then will remove this row from the table if the AJAX response confirms it's deletion on the back end). Right now, I'm just displaying that "aData" for that row.
[code]
.click(function() {
if(!($(this).button("option", "disabled"))) {
$.each(connectionSourceDataTable.fnGetNodes(),function() {
if($(this).hasClass('row_selected')) {
alert(JSON.stringify(connectionSourceDataTable.fnGetData(this)));
return false;
} else {
return true;
}
});
// alert('Remove this source');
}
})
[/code]
I'm prepping a button to delete a selected row so this is the event tied to that button (which later will have an AJAX call to handle that and then will remove this row from the table if the AJAX response confirms it's deletion on the back end). Right now, I'm just displaying that "aData" for that row.
[code]
.click(function() {
if(!($(this).button("option", "disabled"))) {
$.each(connectionSourceDataTable.fnGetNodes(),function() {
if($(this).hasClass('row_selected')) {
alert(JSON.stringify(connectionSourceDataTable.fnGetData(this)));
return false;
} else {
return true;
}
});
// alert('Remove this source');
}
})
[/code]
This discussion has been closed.
Replies
Allan