User selects item from combobox loads in media player and beings playing
Getting error:
System.InvalidCastException: 'Conversion from type 'DataRowView' to type 'String' is not valid.'
Forgot to include I need movieloc to load into windows media player
Code:
Private Sub Movie_Player_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim da As New MySqlDataAdapter("SELECT `movietitle`, `movieloc` FROM `movies` order by `movietitle`", conn)
Dim dt As New DataTable
da.Fill(dt)
MovieBox.DisplayMember = "movietitle"
MovieBox.ValueMember = "movieloc"
MovieBox.DataSource = dt
End Sub
Private Sub MovieBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles MovieBox.SelectedIndexChanged
showMOVIE.URL = MovieBox.SelectedItem <--Error here
showMOVIE.Ctlcontrols.play
End Sub
System.InvalidCastException: 'Conversion from type 'DataRowView' to type 'String' is not valid.'
Forgot to include I need movieloc to load into windows media player