Child collection

Child collection

Old forum URL: forums.lhotka.net/forums/t/5416.aspx


culprit posted on Wednesday, September 17, 2008

I have a parent with a single child collection. For some reason when I bind this to my form, having the child bound to a grid, and when I change a property in the parent it causes the GetIDValue of the child collection info objects to fire. Wouldnt be such a big deal but it puts the grid to the bottom of the list of children.

If I comment out the PropertyHasChanged statement of the parent property this behavior does not occur, but of course this method needs to be fired for BO reasons. Also if I remove the Datasource of the BindingSource of the child bindingsource the GetIDValue methods do not fire.

Could someone please shed some light on what I might be doing here.

Thank You,

Rob

RockfordLhotka replied on Wednesday, September 17, 2008

Are you using a current version of the framework (3.0.4, 3.5.1)?

This is an area that is very tricky, and there've been continual bug fixes around data binding. If you are using a current version there could still be issues (though I hope not), but if you are using anything older then the first thing to do is get current.

Copyright (c) Marimer LLC