Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Databinding combobox end label dont show corresponding items

VB NewbieVB Newbie Member Posts: 206
Hi,

I have a dataset with productnames an prices.
Now i want the productnames to be displayed in a combobox and the corresponding price must appear in a label.
Now everything is working, BUT the price displayed in the label is not belonging to the selected product in the combobox!
How can this be?
This is the code i use:
[code]
ComboBox1.DataSource = oDataSet.Tables("ProductTable")
ComboBox1.DisplayMember = "ProductDescription"

Label1.DataBindings.Clear()
Label1.DataBindings.Add("Text", oDataSet.Tables("ProductTable"), "Prices")
[/code]

Thanks,

VB Newbie
Sign In or Register to comment.