Combobox, DataSource and SelectedItem issue

  • Thread starter Thread starter Daniel Bello Urizarri
  • Start date Start date
D

Daniel Bello Urizarri

Hello:

I have a Combobox with a DataTable as DataSource, using one of the
DataColumns as the DisplayMembers. Everything works fine.
When the user selects an item, the SelectedItem property returns a
DataRowView with the selected row.

My problem is that I can no initialize the combobox to a selected value.
How can it be done?
 
Hi

You should also bind the valuemember of the combobox to the relevant field
in your dataset. Once done you can set the SelectedValue property of the
combobox to make it select the required value

Hope that helps
 
Back
Top