Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding textbox to an object.property

Status
Not open for further replies.

ASMA

Technical User
Sep 23, 2000
12
0
0
ES
Hi.

Let's say I have an object named vendor with to properties: name and surname.

dim Tvendor as new vendor()

Tvendor.name="Peter"
Tvendor.surname ="Cobos"

I have two textbox, Textbox1 and Textbox2 and I thing tahat the following should work

TextBox1.DataBindings.Add(New Binding("Text", Tvendor,Tvendor.name))

TextBox1.DataBindings.Add(New Binding("Text", Tvendor,Tvendor.surname))

and so, linking the properties to the textbox. text property.

The point is that this is not working, Any idea?
Thankyou.
 
OK, I'VE GOT IT.

In case anyone is interested, the right way to do is

TextBox1.DataBindings.Add(New Binding("Text", Tvendor,"name"))


regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top