Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List view FindItem

Status
Not open for further replies.

jnavarro

Programmer
Dec 1, 2003
89
US
I am trying to use the finditem in a listview but I am receiving an error 'FindItem is not a member of the listview'. I have research this in the msdn and other web site but with no success i still cannot get it to work.

 
There's no such animal in VB.NET - FindItem ended with VB6 AFAIK.
You could loop through the items collection:

Code:
For Each itm As ListViewItem In ListView1.Items
   'check whatever property here.. also loop recursively on SubItems collection if necessary        
Next itm
 
You can also use listView1.Items.Contains(...) to check if it exists, then grab it using listView1.Items(...) if it does.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top