I have a combobox that I populate with values from the database. And I have written a code in the SelectedIndexChanged property of the combobox to display the selected item in a label.
VB Code:
  1. Private Sub cbxNationality_SelectedIndexChanged(ByVal sender As System.Object, _
  2.   ByVal e As System.EventArgs) Handles cbxNationality.SelectedIndexChanged
  3.        
  4.     Try
  5.         lblName.Text = cbxNationality.SelectedValue
  6.         'lblName.Text = CType(cbxNationality.SelectedValue, String)
  7.     Catch exp As Exception
  8.         MessageBox.Show(Err.Number & ": " & exp.Message, Me.Text)
  9.     End Try
  10.  
  11. End Sub
However, I get this error: 13: Cast from type 'DataRowView' to type 'String' is not valid.

The commented line too does not work.

Any help will be appreciated.