Databinding & Combobox

  • Thread starter Thread starter francesco
  • Start date Start date
F

francesco

Hi, I have a combobox and I bind it with a dataset
I display one field of the dataset

SqlDataAdapter1.Fill(DsDataSet)

ComboBox.DataSource = DsDataSet(0)

ComboBox.DisplayMember = "Description"


I would like that when the user select one of the item of the combo, in a
textbox of the form the value of another filed of the dataset will e
displayed

Is it possible ?
Thank you
Francesco
 
Hi francesco
Hi, I have a combobox and I bind it with a dataset
I display one field of the dataset

SqlDataAdapter1.Fill(DsDataSet)

ComboBox.DataSource = DsDataSet.tables(0)
I think this will work better
ComboBox.DisplayMember = "Description"

Me.textbox1.DataBindings.Add(New Binding("Text", dsDataset.Tables(0),
"mydisplayfield"))

I would say, give it a try

I hope this helps?

Cor
 
Back
Top