ListView find 
Author Message
 ListView find

I have a list view that has 5 columns in it (shown in detail mode). I want
to allow the user to type in a name, and then I want to search the list for
that particular name. What is the easiest/best way to do that?

I tried the lstboard.items.contains, but I can't get that to work.

So, for example:

Code    Name    Phone                Fax           Zone
0001    Bob        123-1234    123-1235    XYZ
0002    Carl        132-3452    152-6454    ABC

The user could type Car and it would automatically find, and highlight the
line that has 0002    Carl on it.



Tue, 08 Feb 2005 03:20:57 GMT  
 ListView find
Hi there,

There is no "Find" method in the listview control - the best way would be to
just loop through your list of items and search for the text you are looking
for.

-Shamez/Sean

--
This posting is provided "AS IS" with no warranties, and confers no rights.
(c) 2002 Microsoft Corporation.  All rights reserved.


Quote:
> I have a list view that has 5 columns in it (shown in detail mode). I want
> to allow the user to type in a name, and then I want to search the list
for
> that particular name. What is the easiest/best way to do that?

> I tried the lstboard.items.contains, but I can't get that to work.

> So, for example:

> Code    Name    Phone                Fax           Zone
> 0001    Bob        123-1234    123-1235    XYZ
> 0002    Carl        132-3452    152-6454    ABC

> The user could type Car and it would automatically find, and highlight the
> line that has 0002    Carl on it.



Tue, 15 Feb 2005 03:38:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Listview find Column Header Text

2. Listview find function ?

3. ListView find function ?

4. ListView Find Item function ?

5. ListView: Find .Index From .Key

6. Listview find item using API

7. how to find given text in a particular column in listview

8. listview in vb.net with contains from IList to find parital matches

9. How to find an item in ListView?

10. Finding the subitem Listview

11. Finding top index of ListView?

12. HOWTO: Find ListView Item with API

 

 
Powered by phpBB® Forum Software