[2005] Transferring items from one listview to another.
Hey, hope there is a simple solution, i cannot find one but I'm sure there is. I have 2 list view controls and i want whatever data goes into one or is removed from one, it happens to the other as well.
The listviews are on different forms, so it just has to be updated on form load.
So When form2 is loaded it checks the items in form1listview and adds all the items from form1listview to form2listview.
Hope that makes sense.
Thanks
Re: [2005] Transferring items from one listview to another.
Just loop through the items in the first ListView and call the Clone method of each, then add the copy to the second ListView. You could then loop through the items in the second ListView and assign each one's index to its Tag property. Once you're done editing it will then be easy to determine which items in the original ListView to add, edit or delete.
Re: [2005] Transferring items from one listview to another.
Thanks for the help, i got it to work with this code:
vb Code:
For Each lvi As ListViewItem In Options.Orderbox.Items
Checkoutbox.Items.Add(lvi.Clone)