Hi all
I've been struggling with this one for some time now and I would realy appreciate some help.
I have a string which gets data from mssql server, reader collects data (among others also "person)
SQLStr = "select * from tablename order by id desc
command = New System.Data.SqlClient.SqlCommand(SQLStr, connection)
reader = command.ExecuteReader()
While reader.Read()
ListView1SelectedItem = reader.Item("PERSON")
List view contains list of persons (with IDs), including "person" from the reader.
What I want is that item from reader.Item("PERSON") is selected/highlighted in the listview.
I've started from this:
ListView1.Items(0).Selected = True
ListView1.Select()
ListView1.EnsureVisible(0)
but it always select first item in list view and not the actual reader.item.
Anybody has an idea how to do this?
tnx