Suppress Edit Window

Suppress Edit Window

cbp8092cbp8092 Posts: 14Questions: 1Answers: 0
edited October 2013 in Editor
Is there a way to prevent the editor window from appearing? I just want it to go right into my ajaxUrl.

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Hi,

    Yes indeed this can be done, you simply need to use the `edit` API method:

    [code]
    // Automatically submit an edit without showing the user the form
    editor.edit( TRnode, null, null, false );
    editor.set( 'name', 'Updated name' );
    editor.set( 'access', 'Read only' );
    editor.submit();
    [/code]

    where `TRnode` is the row element you want to edit. Used with `set` and `submit` methods you can automate an update. The documentation for the edit method is available here: http://editor.datatables.net/api/#edit

    Regards,
    Allan
  • cbp8092cbp8092 Posts: 14Questions: 1Answers: 0
    Thank you very much.
This discussion has been closed.