Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Getting Unique Values From Listview

  1. #1

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Resolved [RESOLVED] [2005] Getting Unique Values From Listview

    Hello,

    I wonder if anyone can help me please ?

    I have a listview which contains several rows of data.
    I'd like to know if it is possible to pull out only the unique names :

    So for example :

    Row 1 = Vince Chase
    Row 2 = Jonny Chase
    Row 3 = Eric Murphy
    Row 4 = Jonny Chase
    Row 5 = Eric Murphy
    Row 6 = Jonny Chase

    I wouldn't want to see each name as it appears, I'd only want to see each name once, so I'd see :

    Vince Chase
    Eric Murphy
    Jonny Chase

    Is this possible ?
    If so, where would I begin ?

    Thanks.

  2. #2
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: [2005] Getting Unique Values From Listview

    Maybe just use a List (of String) and loop through the listview. Check if your List contains the current item and if not then add it
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  3. #3

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: [2005] Getting Unique Values From Listview

    Thanks again stimbo - as it happens I didn't explain myself very well so I needed to do something slightly different, but thanks anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width