Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 779839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:59:16+00:00 2026-05-14T19:59:16+00:00

I have created a custom data grid control. I dragged it on windows form

  • 0

I have created a custom data grid control. I dragged it on windows form and set its properties like column and all & ran the project. It built successfully and I am able to view the grid control on the form.

Now if i try to view that form in designer, I am getting following error..

Object reference not set to an instance of an object.     




Instances of this error (1)  

1.   Hide Call Stack 

at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.GetMemberTargetObject(XmlElementData xmlElementData, String& member)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.CreateAssignStatement(XmlElementData xmlElement)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.XmlElementData.get_CodeDomElement()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.EndElement(String prefix, String name, String urn)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.Parse(XmlReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload) 

If I ignore the exception, form appears blank with no sign of grid control on it. However I can see the code for the grid in the designer file.

Any pointer on this would be a great help.

I have customized grid for my custom requirements like I have added custom text box n all. I have defined 3 constructors

public GridControl() 
public GridControl(IContainer container) 
protected GridControl(SerializationInfo info, StreamingContext context)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:59:17+00:00Added an answer on May 14, 2026 at 7:59 pm

    I have this problem all the time…it sucks.

    [Ramble(on)]

    Here is what I think I know:

    1. When designing place the control on a form. Build and refresh often..this will let you know what change caused the designer to barf.
    2. Close visual studio all the way an re-open….I cannot tell you how many times I have chased a designer error that was the designer being “stuck”.
    3. It is very important that you understand : The designer is really, really stupid…like bag of rocks stupid.
    4. Any public fields or properties of custom object types will almost always cause designer confusion*. I find the following attributes will clear up most of these problems:

      [Browsable(false)]

      [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

    5. Public fields or properties without a default constructor will always cause designer confusion. When you drop a user control on a form the designer effectively creates the control..so any public object needs a clear creation path. I have found that the easiest way around this (read hack) is keeping the non-trivial custom classes private and expose public properties as a facade.

    — Did I say restart visual studio because sometimes the designer is “stuck” on an error that doesn’t exist ?..I hope I did.

    [Ramble(off)]

    I hope some of this helps..

    *designer confusion: Instead of showing your controls the designer shows you a useless error message that might or might not include the dire warning that it is protecting you from code loss…blah, blah.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 532k
  • Answers 532k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is something wrong with your PHP installation. The web… May 17, 2026 at 12:04 am
  • Editorial Team
    Editorial Team added an answer I am not use dojo, but if the file content… May 17, 2026 at 12:04 am
  • Editorial Team
    Editorial Team added an answer Change this line: UIView setAnimationTransition:(self.mapView == nil ? UIViewAnimationTransitionFlipFromRight :… May 17, 2026 at 12:04 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have created a custom style for my WPF datagrid by overriding its control
Lets say I have a custom data type that looks something like this: public
I have created custom attributes for a category in my module's install script like
I have an ASP.NET GridView which has columns that look like this: | Foo
I am building an asp.net MVC2 web app using StructureMap. I have created a
I created a custom Drupal module and now want to save some preferences for
I have a model with a custom property class RecipeIngredient(models.Model): recipe = models.ForeignKey(Recipe) ingredient
I have a controller that makes HTTP GET requests using a custom class, which
How do I obtain the user's edit input on a custom model JTable created
I'm using a web service which returns a list of products. I created a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.