> When given the name of a control, is there a way (programatically) to
> determine its databinding?
Take a look at Control.DataBindings. This collection contains multiple
data bindings. You have to know which property of the control you're
interested in to get a specific data binding.
For example, if I bind a text box as follows:
TextBox boundTextBox = new TextBox();
boundTextBox.DataBindings.Add("Text", someDataSource,
someDataMember);
Then I can access that binding later on just by indexing it in the
DataBindings collection as follows:
DataBinding textBinding = boundTextBox.DataBindings["Text"]
This is my first post and I'm no expert but I hope that helped. Let me
know if I misunderstood your question.
*no spam* - 21 Oct 2004 11:31 GMT
Doh! That's almost too easy :) Thanks!! Thats exactly what I was looking for...
> > When given the name of a control, is there a way (programatically) to
> > determine its databinding?
[quoted text clipped - 14 lines]
> This is my first post and I'm no expert but I hope that helped. Let me
> know if I misunderstood your question.