set the valuemember of combobox to a project property

G

geraldine hobley

Hello,
I wish to set the valuemember of a combobox to the
value of a property in a class(projlist - see below). I
wish to set the valuember of the combobox cmbstatus to the
value of property "status" in the class Projlist)

Below is how I bind the text field phone on form Myform to
the property phone in class projlist, this works fine.


MyForm.Phone.DataBindings.Add("text",
ProjList, "phone")

However if I do
Myform.cmbstatus.databindings.add
("valuemember",projlist,"status")

I get the message can't bind to this valuemember.

Please help

Geraldine
 
O

One Handed Man [ OHM# ]

If you want to change the value member , you change it in the source
DataSet.DataTable, not the ComboBox.


Regards - OHM




geraldine said:
Hello,
I wish to set the valuemember of a combobox to the
value of a property in a class(projlist - see below). I
wish to set the valuember of the combobox cmbstatus to the
value of property "status" in the class Projlist)

Below is how I bind the text field phone on form Myform to
the property phone in class projlist, this works fine.


MyForm.Phone.DataBindings.Add("text",
ProjList, "phone")

However if I do
Myform.cmbstatus.databindings.add
("valuemember",projlist,"status")

I get the message can't bind to this valuemember.

Please help

Geraldine

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 

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