Dear SyncFusion Team,
I have a grid and using a EditMode.dialog mode for adding/editing. I have requirement when adding / updating a value we need to ensure that the value is not duplicated.
For Example I have two fileds, Employee Name & Role (Both are text boxes). So when click Add button from the Gird Tool bar edit dialog was opened i am entering the values and click save button. In the OnActionBeginEvent (with in this condition [args.RequestType == Action.Save]) I am doing my duplicate validation. So the control/flow hit this area and says yes it is duplicated (for testing i given the known duplicate value) so i am cancelling the flow by "args.Cancel = true;" and the notification display to the user that the value is duplicated but the edit dialog will not closed. So in the same edit dialog user can change the value to the new one (which means without duplicated one) then again click save button then the flow goes to duplicate validation it is not duplicated one so allowed to proceed further then in the custom adaptor the flow goes to UpdateAsync method. Note: Here it should goes to InsertAsync method because I am mentioned above i was clicked add button to enter new employee record. But here the flow goes UpdateAsync here the Emp.ID value is 0. So it returns error.
It is working fine when the duplicate validation is passed in the first time then the flow automatically goes to InsertAsync. Once the duplicate validation failed then it should not allow to proceed further and ask user to correct the value then user will correct the value and click the save button then it goes to UpdateAsync.