why does my combo box display system.Data.DataRowView

Hi Everyone,

While creating a wpf application with vb.net I ran into a problem where selected item is show as "system.Data.DataRowView" Is there any way I can resolve this issue?

Thank you.

Here is my xaml code

  <ComboBox Grid.Column="1" DisplayMemberPath="Name" SelectedValuePath="UID" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="51,8,0,0" Name="cbWrkStn"  IsEditable="True" VerticalAlignment="Top" Width="175" Grid.RowSpan="2" />

Open in new window

And this is my vb.net code
 cbEmp.ItemsSource = dsEmp.Tables(0).DefaultView

Open in new window

Thank you!
Who is Participating?
CodeCruiserConnect With a Mentor Commented:
SelectedItem will be datarowview. You need to either use an index like SelectedItem(0) or use SelectedValue
developer2012Author Commented:
EXcellent answer. Thanks codecruise. :). You are exceptionally awesome
Glad to help :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.