makeeditable / jeditable: How can I use my own function for sAddURL and sDeleteURL
makeeditable / jeditable: How can I use my own function for sAddURL and sDeleteURL
Hello,
I would like to use my own function for sDeleteURL instead of an URL.
I know it`s possible for updating a cell with sUpdateURL like this (see http://jquery-datatables-editable.googlecode.com/svn/trunk/custom-editors.html):
sUpdateURL: function(value, settings){
alert("Custom function for posting results");
return value;
}
but i haven`t found a way for adding and deleting a row.
Thank you!
I would like to use my own function for sDeleteURL instead of an URL.
I know it`s possible for updating a cell with sUpdateURL like this (see http://jquery-datatables-editable.googlecode.com/svn/trunk/custom-editors.html):
sUpdateURL: function(value, settings){
alert("Custom function for posting results");
return value;
}
but i haven`t found a way for adding and deleting a row.
Thank you!
This discussion has been closed.
Replies
sAddURL: function (value, settings) {
return value;
}
In jquery.dataTables.editable.js, you will likely find that it isn't too difficult to modify the functions _fnOnRowAdding() and _fnDeleteRow() to check if sDeleteURL and sAddURL are actually functions and then call them rather than calling $.ajax(). I'm going to do something similar myself so I can support batch updates from a dialog box, in which case I don't want the changes to be sent to the server until the user clicks ok.