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 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.
The answer you provided apears to work. Thank you very much!
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your post. I have been looking into you sample and I can say that because of the Commands you are executing on KeyPressed event the event fires twice. I suggest you see the sample from this forum thread:
http://forums.infragistics.com/forums/t/65984.aspx
which has the functionality you want. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
I am having the same problem as the OP. Am interested to know the response.
Thanks & regards,
Sam