Hi,
I don't know if this is entirely isolated to the grid or even infragistics controls, however I have only seen on infragistic grids.
Is there any reason the ide be it vb.net 2010 or vb.net 2013 ignores some error thrown by the grid at runtime? This happens on both development machines.
For example, the following line would fail with an un-handled exception, if there are no columns set up which is to be expected.
ultraGrid.DisplayLayout.Bands(0).Columns(0).FilterOperandStyle = FilterOperandStyle.Disabled
However if I run the application through the ide with this code included it don't show an error, when I would expect to see an unhandled exception. So this means I don't know its not working. If I run it step by step it just simply jumps out of the code at that line without saying why. As you can imagine it means simple errors get missed at development stage and are only picked up later when the application is tested outside the ide, it also can make it difficult to work out why something is not working when debugging. I know one solution could be write try catches around every line of code but that seems over the top don't it?
Is there an option to make the ide present the error like it should do? Any errors with windows controls or any other code give unhandled exceptions as expected when they should, which is why I think this is specifically related to Infragistics controls and am not bugging Microsoft with it.
It also does the same when a column with an invalid key, for example column "code" has not been set up/exist.
ultraGrid.DisplayLayout.Bands(0).Columns("code").value = "1234"
Any ideas? Is it just us, I don't see anyone else reporting this.
Hello Alex,
This has to do with your exception setup in your IDE. By default first-chance CLR exceptions are ignored. To override this, in Visual Studio check CLR Exceptions under the Thrown column in the Exceptions dialog. Debug > Exceptions... > Thrown.
When you run the app with an empty grid, attempting to set the FilterOperandStyle on column that doesn't exist will result in an ArgumentOutofRange Exception.
Let me know if you have any questions regarding this matter.
Thanks that works, I thought it would be something like that.
Just noticed, it now causes the IDE to fall over even if the code is in a try catch block. And the formula builder seems to fall over every-time I enter a character into it or load a layout into a grid with formulas defined.
PerCederberg.Grammatica.Runtime.RE.RegExpException' occurred in Infragistics4.Win.UltraWinCalcManager.v14.2.dll
PerCederberg.Grammatica.Runtime.ParserLogException
PerCederberg.Grammatica.Runtime.ParseException
I have turned these exceptions off when they occur but should I be worried? Are these falling over now because they exist in try catch statements within the Infragistics dlls. All I am trying to do is to get it to fall over when things are not in the try catch statements.
Hi Alex,
The exceptions are probably nothing to worry about.
Whenever we can, we avoid throwing exceptions in our controls. Our preference is to write the code in a way that resolves whatever issue the exception highlighted instead. This approach makes our controls more performant, since we avoid the overhead involved with exception handling. However, in some cases we cannot avoid an exception.
If you would like, I can look into the specific exception that you're encountering to see if it's expected and whether it can be safely ignored. In order to do so, I will need a reproduction sample so that I can be sure that I am encountering the same exception that you are. Please let me know if this is convenient for you.