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
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