inline form commands
inline form commands
Hi,
I am new to this forum. Just working with examples (inline form commands) and found that DELETE link does not give any confirmation window. How to incorporate it with custom text message. I am also trying ,will let u know once i get a solution for that.
Once again thank u all members and admin of this forum.
I am new to this forum. Just working with examples (inline form commands) and found that DELETE link does not give any confirmation window. How to incorporate it with custom text message. I am also trying ,will let u know once i get a solution for that.
Once again thank u all members and admin of this forum.
This discussion has been closed.
Replies
[code]
// Delete a record (without asking a user for confirmation)
$('#example').on('click', 'a.editor_remove', function (e) {
e.preventDefault();
editor.remove( $(this).parents('tr')[0], '123', false, false );
editor.submit();
} );
[/code]
To have the user confirm that they want to delete the row, you would do something like this (taken directly from the Editor documentation for the `remove` method: http://editor.datatables.net/api/#remove ):
[code]
// Delete a given row with a message to let the user know exactly what is
// happening
editor.message( "Are you sure you want to remove this row?" );
editor.remove( row_to_delete, 'Delete row', {
"label": "Confirm",
"fn": function () { this.submit(); }
} );
[/code]
Allan