0

I have a class, Sample, with a child class, SampleTests. In a presenter class, I have BindingList(Of Sample) property, CurrentSamples. The presenter also has an AddTest method which adds a test to a specified sample in the bindinglist.

In a form, there is a SampleBindingSource that is bound to the presenter's CurrentSamples property. There is also a SampleTestBindingSource that takes the SampleBindingSource as its DataSource and has its DataMember set to SampleTest.

I have verified that when I use the AddTest method that the test is indeed added to that sample. I have also verified that the SampleBindingSource has the added test by looping through the bindingsource records and counting the number of tests on each record. However, if I display the number of records in the SampleTestBindingSource for the sample that has two tests, SampleTestBindingSource only shows one record/test.

I have tried ResetBindings on the presenter's bindinglist, on the SampleTestsBindingSource, and on the SampleBindingSource. I have tried EndEdit on the two bindingsources as well. None of these attempts propogates the changes in SampleTests to the SampleTestsBindingSource.

How can I get the changes in the presenter to propogate all the way to the SampleTestsBindingSource?

Cœur
  • 37,241
  • 25
  • 195
  • 267
blueshift
  • 831
  • 2
  • 12
  • 24

1 Answers1

0

This is my solution to a similar problem I had at a later date:

Child bindingsource bound to child entityset does not update

Community
  • 1
  • 1
blueshift
  • 831
  • 2
  • 12
  • 24