Datatables editable - oDeleteParameters get id of selected row / Rails 3
Datatables editable - oDeleteParameters get id of selected row / Rails 3
simonphp
Posts: 3Questions: 0Answers: 0
I'm trying to pass additional parameters to the ajax call that is done after selecting a row then clicking delete button. Here's the code I have:
[code]
$('#datatable').dataTable( {
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"bFilter": false,
"iDeferLoading": <%= @count %>,
"sAjaxSource": "redraw",
"fnServerData": fnDataTablesPipeline
}).makeEditable({
sDeleteURL: "delete.rb",
oDeleteParameters:
{
foo: function _fnGetRowIDFromAttribute(row) {
return row.attr("id");
}
}
});
[/code]
I tried using the _fnGetRowIDFromAttribute function but it's not working. Please help.
[code]
$('#datatable').dataTable( {
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"bFilter": false,
"iDeferLoading": <%= @count %>,
"sAjaxSource": "redraw",
"fnServerData": fnDataTablesPipeline
}).makeEditable({
sDeleteURL: "delete.rb",
oDeleteParameters:
{
foo: function _fnGetRowIDFromAttribute(row) {
return row.attr("id");
}
}
});
[/code]
I tried using the _fnGetRowIDFromAttribute function but it's not working. Please help.
This discussion has been closed.