Hey All,
I've got a strongly typed dset, w/two datatables: Parent and Child, w/a relation linking them in the way you'd expect (e.g. parent-has-many-children).
On my Child Detail form, I show lots of info on the current child, w/binding calls like so:
me.txtBirthDate.DataBindings.add(New Windows.Forms.Binding("Text", MyDataset, "Child.Birthdate"))
But I would also like to show some info on the child's parent--say, the parent's name. I have tried:
me.txtParentName.DataBindings.add(New Windows.Forms.Binding("Text", MyDataset, "Child.Parent.Name"))
and
me.txtParentName.DataBindings.add(New Windows.Forms.Binding("Text", MyDataset, "Parent.Name"))
But these both result in a blank text box.
I can of course put the parent properties directly on the Child DataTable & fill them w/the results of a join between the underlying db tables, but I'd like to avoid that if it's possible (my real app involves just a few Parents each w/many many Children & I'd like not to be moving so much unnecessary data).
Is that possible?
Many thanks!
-Roy