In this example, full row editing is set up so it only commits changes if the user presses a button, as opposed to commit changes as soon as they are typed in.
You can also see this implemented in a blogpost with samples in Angular/React/Vue and JavaScript here:
https://blog.ag-grid.com/full-row-editing-ag-grid-committing-changes-button-click/
This article looks at an example which shows how we can use buttons to edit, update and delete row data from the grid, while using full row edit mode as shown below:
To achieve this behaviour we use suppress click edit grid option and suppress keyboard events grid callback, so editing can only be achieved through clicking the edit button in our cell renderer and updating can only be achieved through clicking the update button. We are able to cancel the edit using the stopEditing(true) api method, this is used when the cancel button is pressed or when another row is clicked as a row is editing.
See the live examples below:
Javascript:
https://plnkr.co/edit/8bik102emjRrFO3w
Angular:
https://plnkr.co/edit/4UxoGQofSZ3TbJIT?preview
Comments
3 comments
Is it possible to have this example in Vanilla JavaScript?
Is it possible to have this example in Vanilla JavaScript?
Would love vanilla javascript
Please sign in to leave a comment.