Loop through all binding sources on a form

  • Thread starter Thread starter John Sheppard
  • Start date Start date
J

John Sheppard

Hello there,

I was wondering if anyone knew how to loop through all binding sources on a
form?

I tried the below code but the me.controls collection doesnt return
everything :(
For Each obj As Object In Me.Controls

If TypeOf (obj) Is BindingSource Then

MessageBox.Show(obj.name)

End If

Next



Thank you kindly for reading my message

John Sheppard
 
John,

You need the me.bindingmanager for this, however I could not find in a
reasonable way (I am at home now) good information about this on MSDN.
Maybe you can try it yourself.

Cor
 
Thanks cor...

There is no me.bindingmanager? Do you mean that I should be using the
bindingmanager component instead of a binding source?

I never have any luck with MSDN, I only ever seemed to find technical but
usless information there...always found google to be more useful...

Thank you
John
 
Thanks heaps cor...this looks like it might do the job, I will work through
it

Kind Regards
John Sheppard
 
Back
Top