Blazor Grid: How to invoke commands like Update or Cancel manually?
In Grid's toolbar, there are buttons like Update and Cancel.

I would like to invoke those commands from code. How do I do that?
I would like to invoke those commands from code. How do I do that?
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
VN
Vignesh Natarajan
Syncfusion Team
November 11, 2020 04:38 AM UTC
Hi Liero,
Thanks for contacting Syncfusion support.
Query: “ would like to invoke those commands from code. How do I do that?”
Update and Cancel action in Grid can be accessed / invoked using EndEdit() and CloseEdit() method of Grid. EndEdit() method is used to save the changes in Grid. Similarly CloseEdit() method is used to cancel the edit operation. Refer our API documentation for your reference
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan
LI
Liero
November 11, 2020 02:16 PM UTC
Thanks.
How do I find out, whether the grid is currently in edit mode and whether there are some batch changes or no?
How do I find out, whether the grid is currently in edit mode and whether there are some batch changes or no?
VN
Vignesh Natarajan
Syncfusion Team
November 12, 2020 09:23 AM UTC
Hi Liero,
Thanks for the update.
Query: “How do I find out, whether the grid is currently in edit mode and whether there are some batch changes or no?”
We have analyzed your query and we understand that you want to know whether the cell in Grid is in edit state. We suggest you to achieve your requirement using OnCellEdit and OnCellSave event of the Grid along with Boolean variable. OnCellEdit event will be triggered when cell goes into edit mode. OnCellSave event will be triggered when cell is saved. Enabling and disabling a Boolean variable inside these event, we can determine whether the grid is in edit state.
Similarly BatchChanges can be found using GetBatchChanges method of the Grid. Refer our API and UG documentation for your reference
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan
Marked as answer
SIGN IN To post a reply.