Page 1 of 1

[VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Posted: Thu Apr 02, 2020 3:44 pm
by m4qo5
Hi! Please, could you refer me to the documentation about adding custom save button on grid cell edit? I've researched a documentation but didn't find anything. Thanks!

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Posted: Fri Apr 03, 2020 9:43 am
by saki
Adding the button directly in the cell would not be recommended. If you want to send modified data to the server immediately after editing, it is enough to set autoCommit:true on the Grid store.

It is also possible to have autoCommit:false and an out-of-the-grid button clicking of which would call the store's commit method.

See https://bryntum.com/docs/grid/#guides/data/ajaxstore.md for more details on working with data please.

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Posted: Fri Apr 03, 2020 2:10 pm
by m4qo5
Could you explain please why adding button in the cell would not be recommended? Is it possible to have autocommit: true, and save while user types delayed with debounce? Thank you

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Posted: Mon Apr 06, 2020 12:30 pm
by saki
The coding of placing the button in the cell can be just more work. You need to create it, align it into the cell editor and then destroy it. So not recommended to avoid this work, there are no real technical barriers.

Yes, you can set autoCommit:true and the changes will be saved automatically after users goes to another cell. If you want to save as user presses keys you would need to listen to keypress event and decide when to save.