Then it says, "Object reference not set to an instance of an object. "
and "at DevExpress.XtraGrid.Design.GridControlDesigner.Initialize(IComponent
component)"
In my error list, numerous variables that work fine in running code, but it
says stuff like "Object reference not set to an instance of an object."
"The variable 'gridControl1' is either undeclared or was never assigned.",
etc.
When I look at the Designer code, these are both declared and assigned
above, prior to the line mentioned.
What's the best way to troubleshoot this kind of problem?
I have commented out all custom code, and the application compiles fine.
Thanks for your help in advance.
- Daniel
Hi Daniel,
Thanks for your post!
Without reproducing your problem, our information is limited. Based on the
error message, you should have declared certain reference variable,
however, you did not use the "new" keyword to initialize an object instance
for this reference. So when using it, the NullReferenceException will
generate. You should check if these error references have been initialized
correctly.
If you still did not resolve this problem, I suggst you narrow down this
problem into a little sample project, so that I can reproduce on my side
for better understanding.
I look forward to hearing from you. Thanks!
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
ScottDennis - 25 Nov 2008 21:15 GMT
I've followed all the suggestions I've found and can't get the designer to
load my custom control. I created a custom control that is a COM-visible
container with a splitter, a menu in the top panel and a treeview in the
lower panel. It's a pretty simple aggregate control but after I created it I
built the project and I got this warning. Now the designer won't display the
control. When I attempted to instantiate the control in my project it
displayed nothing but didn't fail either. The warning points to a line that
sets the name property of the contained treeview control. The treeview is a
custom treeview that inherits from the regular windows TreeView control. This
same problem doesn't occur when I use the standard TreeView control.
>Hi Daniel,
>
[quoted text clipped - 16 lines]
>Jeffrey Tan
>Microsoft Online Partner Support