HI , I am using this code on OnKeyPress event , which filters my list View, but it only searches in the 1st Column of the List View .. Need Help ..
- for (int i = lv_panel_products.Items.Count - 1; i >= 0; i--)
- {
- ListViewItem lvi = lv_panel_products.Items[i];
- foreach (ListViewItem.ListViewSubItem subitem in lv_panel_products.Items)
- {
- if (lvi.Text.ToLower().Contains(txt_searchproducts.Text.ToLower()) || subitem.Text.ToLower().Contains(txt_searchproducts.Text.ToLower()))
- {
- lvi.BackColor = Color.Black;
- }
- else
- {
- lv_panel_products.Items.Remove(lvi);
- }
- }
- }