Databinding column of DataRow

A

Allan Bredahl

Hi all


I have a form containing a DataRow object representing e.g. data for a
customer with the following columns : name, address, workaddress

This form contains two TextBoxes an one ComboBox : txtName, txtAddress and
cmbWorkAddress


I want to be able to make a databinding between the specific records/columns
in the datarow and the three Controls on the form.

e.g. txtName.DataBindings.add("Text", customerRow, "name")



Thids doesn't seem to work, but what is the right way to do this



Thanks in advance

Allan
 
S

Steve Alpert

Allan said:
Hi all


I have a form containing a DataRow object representing e.g. data for a
customer with the following columns : name, address, workaddress

This form contains two TextBoxes an one ComboBox : txtName, txtAddress and
cmbWorkAddress


I want to be able to make a databinding between the specific records/columns
in the datarow and the three Controls on the form.

e.g. txtName.DataBindings.add("Text", customerRow, "name")
Could you look at the Parse and Format methods of a binding object to
pull apart the piece you need?

/steveA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top