Hello,
Version 10.1.20101.2013
In the attached sample project, if I update the column "field_int" with an invalid value like "a", then I click inside one of the 2 textbox on the right, I get stuck in a infinite loop of "Data Error" messages.
How to solve this issue ?
Hmm well, user controls doesn't fix the problem if I add more level of nesting...
Since the bug reported to Microsoft was caused by a MessageBox, i did try to set e.RaiseErrorEvent = false in the CellDataError event to prevent the display of the error messagebox. The result is there is no more infinite loop, but a new very strange behavior: the focus is in the "outside" textbox but keystroke are typed into the grid cell !?!
To compare behavior, I tried using a comboEditor set to LimitToList, which is even more deeply nested than the grid, and it behave correctly, I can't leave the combo when clicking away, even if clicking in parent containers.
So it seems a grid bug to me.
I attached another sample to demonstrate this
I replaced child forms with user controls and indeed the problem goes away.
Many thanks !
Hi,
I'm pretty sure that this is happening because you are parenting forms inside of other forms.It's probably the same issue I reported to Microsoft here:
Showing a MessageBox and setting focus to a control in the Leave event of that control inside nested ContainerControls causes an infinite loop. | Microsoft Connect
I strongly advise you against doing this. In my experience, this will cause all sorts of problems with the tab order and focus issues.