Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search in specific column in ListView

I have created a ListView with three columns and I want to find a value only in specific column (e.g. PK column):

myListView.Columns.Add("Index");
myListView.Columns.Add("PK");
myListView.Columns.Add("Value");

How can I do this?

like image 670
Majid Avatar asked Oct 03 '22 22:10

Majid


1 Answers

foreach (ListViewItem lvi in listView1.Items)
  if (lvi.SubItems[1].Text=="Text for search")
     MessageBox.Show("!!!!!!!");
like image 163
slava Avatar answered Oct 07 '22 20:10

slava