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
200
Can't leave focus from UltraDateTimeEditors when pressing tab
posted

Hi,

We are facing an focus issue with the UltraDateTimeEditor control. UltraDateTimeEditor doesn't give up the focus once selected. I cannot tab out of the control or even clicking outside the control, it doesn't leave the focus.

We are binding UltraDateTimeEditor control with TableAdapter.

On debugging I found that:

After AfterExitEditMode event, it re-enters the editing state for some reason. Below is the sequence of the events fired.

Now the problem is that After Validating event, it re-enters the Edit Mode..

private void _deVisitStartTime_BeforeExitEditMode(object sender, Infragistics.Win.BeforeExitEditModeEventArgs e)     

  { 

  }

        private void _deVisitStartTime_AfterExitEditMode(object sender, EventArgs e)
        {
               
        }       

        private void _deVisitStartTime_Validating(object sender, CancelEventArgs e)
        {
            e.Cancel = true;
        }

        private void _deVisitStartTime_BeforeEnterEditMode(object sender, CancelEventArgs e)
        {
            e.Cancel = true;
        }
   
        private void _deVisitStartTime_AfterEnterEditMode(object sender, EventArgs e)
        {
               
        } 

And it stucks within these events and so not leaving the focus out of it.

Please suggest why it is re-focusing the control, after exiting it.

How I can resolve this issue, so that it allows me to leave this control.

I have reffered to some similar problem post and tried what was suggested there, but had no luck.

http://news.infragistics.com/forums/t/63159.aspx

 

Thanks,

Balraj

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Balraj,

    It's because you are cancelling the Validating event. That's what the Cancel parameter does - it prevents you from leaving the control. This is true of any control - this event is not even an event of the UltraDateTimeEditor, it's an event on Control.

Children