I am trying to retrieve items from a Listview SelectedIndexChange event and am struggling to find a way to do it.
I have included my code that populates the Listview and that is working ok. All I need to do is put the results in a string 'str' which I declared elsewhere.
I would be grateful if someone could show me a way or point me in the right direction.
Dim cmd As OleDbCommand = New OleDbCommand("Select * from Customers", cn)
dr = cmd.ExecuteReader()
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(dr(1))
Catch ex As Exception