How to search through ListViewRows

Mar 2, 2009 at 9:41 PM
I have to search through ListViewRows for a particular ListViewItem. Can someone tell me how to do that?
Mar 4, 2009 at 12:15 AM
If the the name of ListView (which contain a list of folders) is "filGrid" and you have to search for a row containing a particular foldername (say "MyFolder"),
the following code will search for and select the required row:

// find the appropriate row


ListViewRow row = filGrid.Rows.Find(delegate(ListViewRow r) { return r.PrimaryIdentification.Equals("MyFolder"); });