Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

Editor presubmit event

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

I want different logic in the presubmit event depending on the type of edit being performed. If the user does a bubble edit on a column i want to ignore all the logic in the presubmit event. If the user edits the entire record in the editor dialog I want the logic to execute in the presubmit event.

How do i determine which action the presubmit came from.

        editor.on('preSubmit', function (e, o, action) {
            // if in edit mode and not a bubble event
            if (action == 'edit') {
                // Execute some code if not a bubble submit
                }

                // If any error was reported, cancel the submission so it can be corrected
                if (this.inError()) {
                    return false;
                }
            }
        });

The parameters in the function do not seem to provide access to the initiating event type. (bubble, dialog)

thanks, Dave


Viewing all articles
Browse latest Browse all 3740