Hey all,
I have a listbox, textbox, and search button on my form. I am populating my listbox with data from a sql database. I need to be able to seach my listbox and filter it. Here is what I have so far:
Sub RefreshListBox()
Dim DSDept As New DataSet
DBADataServer.SelectCommand.CommandText = "SELECT DeptName FROM DSDept ORDER by DeptName"
DBADataServer.Fill(DSDept)
For i As Integer = 0 To DSDept.Tables(0).Rows.Count - 1
lstDept.Items.Add((DSDept.Tables(0).Rows(i).Item(0)))
Next
End Sub
That populates my listbox. I've looked online and could not find anything useful. If anybody could lend me a hand id appreciate it :)