Hi,
It's very hard to say what could be causing this without being able to reproduce the issue. Are you able to reproduce this error in a small sample project, or can you give me some steps to follow to make this happen?
I took a quick look at the source code for the method where property getter of the EditorComponent property and the very first thing it does is bail out if it's in Design-mode, so something must be getting confused here about what mode the control is actually in. Is your grid in a UserControl or some other container or directly on a form? Are you deriving your own control from the grid? I've seen cases where Visual Studio can become confused about whether it's Design mode or not when controls are inside UserControls.
Even so, I took a look at the rest of the code in this property and I don't see anything in there that could possibly result in a NullReferenceException. The code in the method is good about doing all the proper null checks. It's possible that a method that is called is blowing up, but you would expect that to show up in the call stack if it were the case. Unless maybe VS is inlining the code for optimization.
If you can create a sample so we can duplicate the issue, we will be happy to look into it and get it corrected. If not, you might want to consider simply assigning your editor components at run-time, in the InitializeLayout event of the grid as a workaround.
Thanks, Mike!
Here is how I can reproduce this error in visual studio (either 2008 or 2010 rc):
1. New winform project.
2. New Usercontrol in the project.
3. Drag a UltraGrid into the UserControl with UltraDataSource bound to it. Create whatever bands, columns in the UltraDataSource.
4. Drag a UltraColorPicker into the UserControl
5. Set the EditorComponent property of whatever column of the UltraGrid into the UltraColorPicker
6. Build the project and drag the UserControl into the default Form.
7 .Reopen the Usercontrol, and activate the designer of the UltraGrid , click Feature Picker on the left side and the exception warning will show now.
Like you said, it's indeed a result of UserControl with UltraGrid in it. Can this be fixed besides setting the EditorComponent property at run time?
Thanks. I followed your steps and had no trouble duplicating the exception. There's probably something off going on here with the grid that is being used within the designer. I don't see any way around this except to set the EditorComponent at run-time.
But I have forwarded this thread and my sample over to Infragistics Developer Support, so hopefully we can get this fixed for the next service release.
Thank you, Mike!
Is there any update on this issue? I am seeing the same behavior in 10.2.