I was noodling around with this with Charles and it worked great. We even made a component that you could drop on a form, set three properties and boom, order of items in listview is easily changeable. We made it specific to a SF ListView. He has the latest and greatest SF on Vista.
Then I tried to reproduce this in my environment, XP with 1.6.7. I used a plain old vanilla .NET ListView. It doesn't work. No matter what I use for this line as the index:
this.List.Items.Insert(index, item);
it inserts the item back in the same position. Thus:
this.List.Items.Insert(0, item);
this.List.Items.Insert(34, item);
this.List.Items.Insert(23454, item);
all put the item back exactly in the same position as it was to start. I.e. if the original index of the item is, say, 10, then each of these will put the item back at index 10.
Any ideas what might be causing this? I tried this with a target of 2.0 and 3.5. Same diff.