HighTechTalks DotNet Forums  

ListView Control

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss ListView Control in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Charles A. Lackman
 
Posts: n/a

Default ListView Control - 02-18-2004 , 12:17 PM






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




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.