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?
Hi,
What version of the grid are you using? This sounds to me like a known bug that was fixed a while ago. Try getting the latest service release and see if that helps:
How to get the latest service release - Infragistics Community
If I'm wrong and that does not help, see if you can reproduce the problem in a small sample project and post it here so I can take a look.
I am using 8.3.20083.2039.
If the issue was fixed after that, let me know. I will try to create a small sample.
This is how it happens for me. If I enter something invalid in the grid (say a letter in a numeric column), when I exit the cell, I will get the validation error message. The focus then goes back to the invalid cell after OKing the validation error. If instead of fixing the cell, I then click somewhere outside of the grid (we have a menu bar outside of the grid that lets you bring up other tools, so for example I use that menubar to do something) -- now the grid will go into an infinite loop of validation error messages -- OK the error message, another one comes up, etc.
It's possible that the action that I am taking outside of the grid is causing some type of reaction (event handling) in the grid -- I'm not sure about that and will need to check.
Clicking on a menu item will have no effect on the grid by itself, since a menu does not take focus. So if anything at all is happening there, then it must be either because you are calling UpdateData or ExitEditMode on the grid, or else your "other tools" are taking focus away from the grid.But without knowing exactly what you are doing there, it's hard to judge.
I tried out a simple test with a button on the form. I type a letter into a numeric field and click the button. I get an error, I click OK. Then I click on another button and once again I get an error and click OK. But it works fine for me, I just get the one error message each time.
I am not able to reproduce this problem in a smaller sample. But I did see similar behavior when running the Infragistics sample "V5.2 Extension of Summaries Functionality" (from the Win Grid Samples Explorer). If I expand on "Category 1", and enter a letter in the Units column, I will get the Data Error popup. OK out of that error, then click on the Collapse symbol for Hide Settings Panel (near the top). You will get a series of 3 Data Error messages in a row. I think this is similar to my problem, only I get an infinite number of Data Error messages.
Perhaps if you can give me some guidance as to what is happening in that sample, that would provide some insight. Right now, I'm not even sure where to break as I can't seem to find a break point before the popup comes up.
Thanks for you time.
I tried this out with the sample like you described and I am able to duplicate the issue. I'm not entirely sure that this is the same issue you are experiencing, but it's definitely something that needs looking into either way. So I'm going to forward this thread over to Infragistics Developer Support so they can write it up for developer review.
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
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!
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?