[RESOLVED] [2005] Moving ListView items?
Hello everyone,
I have a ListView control in tile mode with multiple items. All items have an image and multiple subitems, so it's quite 'heavy'.
The user can use buttons to move items up and down the list. To make this work, I now create an array of the items in the new order, then I empty the ListView and finally put the new array of items in. Sadly, this works very slow. It literally takes seconds for the new list to display.
So, I wanted to know, is there a faster way to move items in a listview? It would be great if it was possible to just actually move an item to another position, instead of rebuilding the entire list.
Thanks for any help,
arsmakman.
Re: [2005] Moving ListView items?
Yes, I will do you an example.
Re: [2005] Moving ListView items?
1 Attachment(s)
Re: [2005] Moving ListView items?
Here you go.
It assumes multiselect is set to false. You would have to add additional code to move mutliple items at once... however if that is what you want to do, this code should get you started.
Re: [2005] Moving ListView items?
Thank you for the code, it works fine.
By the way, MultiSelect is indeed disabled, users may only move one item at a time. :)
Re: [RESOLVED] [2005] Moving ListView items?