Main visual editing mode - Avoid sending all row data to the server

Main visual editing mode - Avoid sending all row data to the server

guidolsguidols Posts: 38Questions: 14Answers: 1

Hi,

let's take the multi row editing example.

If I would use the inline or the bubble editing to update, let's say, a particular "Position", then only the modified cells would be sent to the server.

If I use the main editing mode (i.e. by clicking the "Edit" button) and update, for instance, only the "Position" cell of a couple of rows, then all the rows data is sent to the server (the data can be checked in the preSubmit function).

This makes sense; but in my use case I, dynamically, hide some fields from the displayed modal (after clicking the "Edit" button) and I don't want that these fields are sent to the server.

This would allow me to reduce any possible data overwriting conflict.

How can I implement this?

Is there any attribute that I can, dynamically, add (and remove) to the fields?

Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,236Questions: 1Answers: 10,418 Site admin
    Answer ✓

    Yes, what is submitted is controlled by the submit property of the form-options object. By default it is everything for the main editing, and changed for bubble + inline.

    To change use formOptions.main - e.g.:

    formOptions: {
      main: {
        submit: 'changed'
      }
    }
    

    Allan

  • guidolsguidols Posts: 38Questions: 14Answers: 1

    Thanks for the super fast answer! :)

Sign In or Register to comment.