I have a cell with a dropdown and when I make a selection then move off of the grid by say, clicking on a button outside of the grid, I get an error because the cell failed to validate the new selection. an error msgbox shows up but when I dismiss it, the msgbox pops up again and there is nothing i can do other than kill the app.
It seems like when I dismiss the msgbox, the app wants to move the focus to the button but the cell fails to validate again and thus pops up the msgbox again and again.
It'd be nice if I could either prevent the focus to be moved away until everything is valid or somehow move the focus back to the grid after the initial error msgbox showing up.
What options are there?
Sure, here's the link:
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
We have the same issue with a couple different grid instances (v9.2). Could you provide a link to your bug submission to Microsoft so that we can better understand the nested UserControl issue?
Thanks!
Hi,
There are a number of possible causes for something like this. If your grid is inside a ContainerControl which is nested inside another ContainerControl, then this is a known bug regarding the ContainerControl class, which was reported to Microsoft. As far as I know, there's no way around it other than to avoid using ContainerControl or derived classes. ContainerControl includes such controls as UserControl, SplitPanel, and the Tab control.
If you are not using ContainerControls, then this could be a bug in the grid or it might be a timing issue of some kind. Can you reproduce the issue in a small sample project and post it here so I can take a look?
I am also having the same issue...I just wondered where I could find the solution if you already figured it out otherwise what will be the solution
Well, it's hard to say for sure, since I don't have v7.3 to test with. But one thing you could try is handling the CellDataError and/or the Error event of the grid and using an anti-recursion flag to prevent the event from firing more than once. Or... just turn off the messagebox using the properties on the event args.