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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Binding to a Text Box

Status
Not open for further replies.

iainmc

Programmer
Dec 2, 2002
53
GB
I can not set the Data Binding "Text" property of a text box at run time (programatically). Can anyone help?

I need to do this at run time as i want to retrieve data from DataTable i created at run time so the options do not appear in the data bindings at design time.

Please help, my head really hurts!!!!
 
Try this:

txtMyTextbox.DataBindings.Add(New Binding("Text", myDataSet, "myDataTableName.MyDataColumnName"))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top