List View

  • Thread starter Thread starter Lou
  • Start date Start date
How do you add items(Insert) to the top of the List View?
-Lou

I don't think you can, at least not with a single method.

But surely the brute forcde way to do it should work. Declare a
temporary List(Of String) collection, copy the ListBox's Items
collection to it. Clear the ListBox's Items collection. Add the new
item you want at the top. Copy the List(Of Stirng) collection back.
 
I found it!

Dim li As New ListViewItem

li.Text = "Hello"

li.SubItems.Add("New World")



lv.Items.Insert(0, li)
 
I found it...
I found it!

Dim li As New ListViewItem

li.Text = "Hello"

li.SubItems.Add("New World")



lv.Items.Insert(0, li)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top