469,904 Members | 2,071 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Finding an item in ListView

I need to locate an item in ListView, quickly. I have a listview with items,
for each I added a unique "Tag" property. Is there a simple way to rapidly
search through these items to find based on its Tag value?

Tia, Stu
Nov 16 '05 #1
2 6118
You could create a Hashtable to be used in parallel. Some memory redundancy,
but probably OK unless you have thousands of items in the ListView. The tag
value would be the key in the Hashtable.

--
kevin aubuchon
www.aubuchon-design.com
"Coffee guy" <Co*******@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
I need to locate an item in ListView, quickly. I have a listview with items, for each I added a unique "Tag" property. Is there a simple way to rapidly search through these items to find based on its Tag value?

Tia, Stu

Nov 16 '05 #2
Ok thanks, I thought ListCtrl used to offer this functionality, but your
suggestion will work just fine.

"Kevin Aubuchon" wrote:
You could create a Hashtable to be used in parallel. Some memory redundancy,
but probably OK unless you have thousands of items in the ListView. The tag
value would be the key in the Hashtable.

--
kevin aubuchon
www.aubuchon-design.com
"Coffee guy" <Co*******@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
I need to locate an item in ListView, quickly. I have a listview with

items,
for each I added a unique "Tag" property. Is there a simple way to

rapidly
search through these items to find based on its Tag value?

Tia, Stu


Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phil Watkins | last post: by
9 posts views Thread by C# Learner | last post: by
1 post views Thread by Jim McLeod | last post: by
12 posts views Thread by Mike Smith | last post: by
1 post views Thread by plmanikandan | last post: by
2 posts views Thread by Morten Snedker | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.