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 446449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:28:19+00:00 2026-05-12T21:28:19+00:00

I have a business object, which is a composite of child objects. I am

  • 0

I have a business object, which is a composite of child objects.
I am using databinding in Visual Studio 2008 to bind to controls on a Windows form.

But I am getting the above error in the InitializeComponent method of the form.

Lets say I have an object called ParentObject which contains a generic list, ChildListObject. The ParentObject also has Child object, which itself has a Child object. (ie ParentObject.ChildObject.ChildObject)

I set the main binding source:

BindingSource.Datasource = ParentObject

I add a grid and set it’s binding source:

GridBindingSource.Datasource = ParentObject

and set the DataMember to:

BindingSourceB.DataMember = "ChildListObject"

Now, the grid’s datasource is set to GridBindingSource:

Me.MyDataGridView.DataSource = Me.GridBindingSource

There are also other controls that are bound to properties of the ParentObject and the ParentObject.ChildObject

I have tested this in an isolated project and it works fine, so I am having trouble finding out what the real bug is? Code that used to work, will all of the sudden stop working.

The error I get is (if I use the names of the objects in the above example):

“DataMember property ChildObject cannot
be found on the DataSource”

It fails on:

Me.MyDataGridView.DataSource = Me.GridBindingSource

Strangely, if I remove <System.Diagnostics.DebuggerStepThrough()> and then when it fails just continue it is fine??? But it still fails in runtime.

Does anyone have any ideas that could point me in the right direction? The closest I have found through googling is it may have something to do with the order of the generated designer code getting messed up. Code that was working, will all of the sudden stop working.


This issue seems to come and go. If I just continue after the error is raised the program happily continues with no problems. Possibly a bug in VS. But at run-time the error still exists.

What is causing this problem? How do I stop it occurring?

  • 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-12T21:28:19+00:00Added an answer on May 12, 2026 at 9:28 pm

    The only workaround I have found to do the following:

    1. Remove all columns from the grid
    2. Add the desired columns back to the grid (this prevents the columns from being deleted in the next step)
    3. Remove the grid datasource
    4. Set the grid’s datasource in the form load event.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a business object project, which contains composite structure: public class Tree {
I have a generic business object collection class which contains some business objects: public
So, I have a ListBox which is bound to a list of business objects,
I have a question regarding the integration of business objects developed using Linq To
I currently have a business object with a validation business rule, which is it
I have a Business Object which contains a DataTable among other properties. I pass
I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that
Let's say we have a business object, let's call it a Foo , which
So I have a business object that supports a Save-method which does some IO
I have a business object class BusinessObject which implements an interface IAlternateInterface. I already

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.