Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4341
RecordUpdating event called multiple times
posted

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.

RecordValidation.zip
Parents
  • 138253
    Offline posted

    Hello,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

Reply Children