Hello,
I have a basic grid with addresses of branch locations and have implemented address verification on the server side. When the user clicks save, the verification runs and if the address needs changes I update args.Data fields accordingly. I would like to cancel the save (this I know how) and update the dialog form with the updated address and have the user verify suggested changes and if they are okay hit save again to save. The second time the user hits Save the address would be be already normalized.
How can I update the content of the fields in the edit dialog?
Here is code extract to illustrate the ask:
private async Task ActionBegin(ActionEventArgs<Branch> args)
{
if (args.RequestType == Syncfusion.Blazor.Grids.Action.Save)
{
string oldAddress1 = args.Data.Address1;
string oldAddress2 = args.Data.Address2;
string oldState = args.Data.State;
string oldZip = args.Data.Zip;
string oldCity = args.Data.City;
// Address Verification code here args.Data is updated with new values
if (AddressNormalized)
{
// display SFDialog informing user how the address changed comparing Original and Normalized
// cancel the save action - the edit form remains open
args.Cancel = true;
// Here I need somehow to update the fields in the edit form with the content of args.Data and allow the user to review them and change them.
}
else
{
// finalize edit, save data and close edit dialogue
}