i manage to put a data in listview. i have a problem in searching a data.
here is my code:
Dim sda As New SqlDataAdapter
Dim ds As New DataSet
Dim dt As New DataTable
Dim NumberRow As DataRow
objCon = New SqlConnection(conStr)
objCon.Open()
obj = objCon.CreateCommand()
strSQL = "(Select * from Supplier where sup_code = '" & textbox1.text & "' OR sup_name = '" & textbox1.text & "')"
obj.CommandText = strSQL
sda.SelectCommand = obj
sda.Fill(ds, "Supplier")
dt = ds.Tables("Supplier")
ListView1.Items.Clear()
ListView1.Items.Clear()
For Each NumberRow In ds.Tables("supplier").Rows
ListView1.Items.Add(New ListViewItem(NumberRow.ItemArray.GetValue(0).ToString().ToUpper()))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(NumberRow.ItemArray.GetValue(1).ToString().ToUpper())
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(NumberRow.ItemArray.GetValue(2).ToString().ToUpper())
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(NumberRow.ItemArray.GetValue(3).ToString().ToUpper())
Next
all i want is every time i input a data in my textbox the data in the listview will focus of what he inputted in textbox. for example i inputted 1 in my textbox in the listview it will highlights all the column in 1. can anyone help me?