Hello Support,
We are using the RecordUpdating Event of the xamDataGrid in order to validate a record. Incase the record is not valid, we need to cancel the update and retain the changes and hence are using the e.Action = RecordUpdatingAction.CancelUpdateRetainChanges. However, when an existing record becomes invalid and the user presses the enter key, the record updating event gets called twice. We also need to set the focus to the below cell on enter key press and hence have handled the PreviewKeyDown event.
Also when the first cell of the template add record is set to active, the record updating event gets called.
We need the record updating event to get called only once when the user presses the enter key or clicks outside the record; and not when a cell of the template record is set active or when the update is canceled.
We have also attached a sample application for your reference.
Waiting for your reply.
Thank You.
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
The answer you provided apears to work. Thank you very much!
Hello Sam,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.