listview1.items.add << it's is possible to declare a specific subitems vertically?
i don't know how, but i'm still trying fix this


please help


here's my sample

Dim item As ListView
            Dim row As ListViewItem = Me.lstLicense.Items(0)

  With row
                lstLicense.subitems.Add(16).Text = (objDataReader("Division"))

            End With

Recommended Answers

All 4 Replies

This might be correct way to do it

Dim newItem As ListViewItem

' Start with four sub items
newItem = New ListViewItem(New String() {"First", "Second", "Third"})
ListView1.Items.Add(newItem)
' Now add the fourth sub item
ListView1.Items(0).SubItems.Add("Fourth")

HTH

ow, thanks for your reply i already try your code but there's no luck.

Can you describe what you are trying to do in functional (non-programming) terms?

This should work. I have tried this before and worked fine for adding subitems to my columns. You may need to declare the Item you would like to add the subitem to but other than that it should work.

ListView1.Items.SubItems.Add("String")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.