Question : How do I extract the distinct values from a listview column

Hello,

I have a list view consisting of four columns. One of the these columns can contain duplicate values.  How can I extract the distinct values from that column.  I want to use those values to populate a combo box.  For example if the list view column has the following valued
1
1
2
2
2
3
3
I would want to extract 1, 2 ,3

Answer : How do I extract the distinct values from a listview column

Try this:
1:
2:
3:
4:
5:
        For Each item As ListViewItem In ListView1.Items
            If ComboBox1.Items.Contains(item.SubItems(0).Text) = False Then
                ComboBox1.Items.Add(item.SubItems(0).Text)
            End If
        Next
Random Solutions  
 
programming4us programming4us