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
1890
Setting Focus to XamNumericEditor
posted

I'm having an issue when I'm binding a focus property to a Numeric Editor. The issue I'm having is when I click on the control it calls the GotFocus event handler and that changes the property, but the the numeric editor is looping back and forth from GotFocus to LostFocus event handlers multiple times while a regular textbox works just fine. Is there a reason why? Attached is a sample demo to explain. 

 

BindingIssue.zip
Parents
No Data
Reply
  • 30945
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and it seems that the GotFocus event for the XamNumericEditor is firing two times, when you using the IsFocused property. After investigating this behavior, it turns out that the reason for it is that the XamNumericEditor is not in edit mode and when the first time the GotFocus is fired and the XamNumericEditor is focused, the editor is entering edit mode and the event is fire again. What I can suggest in order to avoid this behavior is setting the IsAlwaysInEditMode property of the editor to true. By doing so, when you focus the editor, it will be in edit mode and the event will fire only once. I have modified the sample application that you have attached in order to implement this approach.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    BindingIssue_1.zip
Children