Link to home
Start Free TrialLog in
Avatar of developer2012
developer2012

asked on

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!
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of developer2012
developer2012

ASKER

EXcellent answer. Thanks codecruise. :). You are exceptionally awesome
Glad to help :-)