ListView Control

C

Charles A. Lackman

Hello, I am having a difficult time trying to get the ListView to Inset an
new item at a particular index. The following is an example:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
ListView2.Items.Add(New ListViewItem("Another Test", 0))
ListView2.Items.Add(New ListViewItem("2", 0))
ListView2.Items.Add(New ListViewItem("3", 0))
ListView2.Items.Insert(1, New ListViewItem("A New First Item"))
End Sub

The ListView is Sort Property is set to None. The Inserted Item is always
placed at the end of the ListView, instead of index 1.
Any Help or suggestions would be greatly appreciated.
Chuck
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top