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
670
RecordUpdating
posted

Hi,

I have a problem with this event.

I'm doing this record's validation in this event. So when it's no valid I set

e.Action =

RecordUpdatingAction.CancelUpdateRetainChanges;

But if the RecordUpdating is fire by click in another control (Button for exemple) after updating XamDatagrid has lost focus !

How to retail focus in Record after my validation !

Thanks for your ansmer ! 

  • 2677
    posted

    Hello,

    When using the CancelUpdateRetainChanges action, the grid should automatically keep that record active.  When clicking on a different row, it will allow you to, but you will not be able to go into edit mode on any other cell.  However, if you click on another button, you will steal focus from the grid.  Im not sure that there is a good way to keep focus in the grid.  That is the normal flow of action.  The best way that I can think is if you dont want to button to react, you can wire it up to a command and modify the can execute of the command based on a valid property on your viewmodel or something.  

    If you are still looking into this, we can explore some more options.  Sorry that it took so long to get back to you.