我正在尝试创建一个列表视图,用于显示来自Access数据库的tblProduct,我想知道如何按价格创建搜索功能和过滤器This is my form design
Connect()
Try
testconn()
cmd = New OleDbCommand("SELECT * FROM tblProduct", conn)
da = New OleDbDataAdapter(cmd)
dt = New DataTable
da.Fill(dt)
Dim myRow As DataRow
For Each myRow In dt.Rows
ListView1.Items.Add(myRow.Item(1))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(2))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(3))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(4))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(5))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(6))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(7))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(8))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(9))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(10))
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add(myRow.Item(11))
Next
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub