Hi Audrey,
Greetings from Syncfusion support.
You can prevent the Save action in Grid by cancelling the save in OnActionBegin event of Grid, based on your scenario. In the below code, based on the RequestType as Save and based on the value entered for the CustomerID column as “DontSave”, we have prevented the save action. So now the edit form will be remained open when DontSave value is entered as CustomerID column field value.
Please refer and use like the codes below,
| <SfGrid @ref="Grid" TValue="Order" ...> <GridEvents OnActionBegin="OnActionBegin" TValue="Order"></GridEvents> ...</SfGrid>
public async Task OnActionBegin(ActionEventArgs<Order> args)
{
if (args.RequestType.Equals(Action.Save) && args.Data.CustomerID == "DontSave")
{ args.Cancel = true; //prevent the save action
}
}
|
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran