Databinding to a related table

Hi all,

I'm trying to bind a label to a field contained in a related table.
As I've seen in many places, it easy to do a binding with the following code

textBox1.Bindings.Add("Text", ds, "ParentTable.Relation.ChildField");

but what if I'd like to do something like this:

textBox1.Bindings.Add("Text", ds, "ChildTable.Relation.ParentField");

I couldn't get it to work


Thanks in advance


Answer this question

Databinding to a related table

  • wjc

    If you want to bind the text box to the parent field in the parent table then textBox1.Bindings.Add("Text", ds, "ParentTable.ParentField") will do just that.
  • Databinding to a related table