Moving items in a listview? up and down either dragging or with buttons


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
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.



Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This is a bit strange and without getting my hands on the code this could be hard to diagnose this way. This is ringing a bell with me but I can't put my finder on the answer....but it does sound familiar?!?
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Here is a sample app. I'm pretty stumped. I upgraded to latest official release (1.7.0.2) and tried it on two machines. They are both XP though.
Attachments
ListViewSequencerSample.zip (126 views, 49.00 KB)
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Has anyone had a chance to take a look at this yet?
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Nope Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search