For editor updates (i.e., when it POSTs to the server), I have successfully implemented passing a custom form element called DatabaseName. I do this by adding to the editor upon initialization:
editor = new $.fn.dataTable.Editor({
...
}).add({
name: "DatabaseName=" + (dbName || $(".ddlDatabases").val())
});
However, when I select a row and click the Delete button, it POSTs to the server BEFORE opening a dialog box (which contains a div with class "DTE_Action_Remove" which contains a nested Delete button). When it POSTs to the server BEFORE the delete dialog pops up, it DOES contain the custom DatabaseName element, but nothing actually happens on the server (until after the confirmation).
But, when I confirm the delete prompt by clicking the Delete button on the dialog, it POSTs to the server a second time. This is the action that is supposed to perform the actual delete, but on the second POST it no longer contains my custom element. How can I re-add my custom element to the actual POST action that performs the delete upon confirmation?
I have tried calling this on the ".DTE_Action_Remove button" click event, but it doesn't work:
editor.add({
name: "DatabaseName=" + (dbName || $(".ddlDatabases").val())
});