Reputation: 1389
I'm coding in VS2008 using C#.
On my form, I have a ListView control. Now, it's purpose is for the user to add items to it. However, each new item is added AFTER the last item in the list.
Is there any way to have each new item be put as the first item in the list?
Upvotes: 0
Views: 187
Reputation: 25790
Use Insert
into 0 index or your own choice.
See MSDN's reference
listview1.Items.Insert(0, newListviewItem);
Upvotes: 5
Reputation: 351446
Instead of using the ListView.Add
method, use the ListView.Insert
method.
Upvotes: 4