|
-
Dec 26th, 2007, 03:13 AM
#1
Thread Starter
Member
[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
Last edited by Wulfgur; Dec 26th, 2007 at 04:53 AM.
-
Dec 26th, 2007, 03:45 AM
#2
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.
-
Dec 26th, 2007, 04:12 AM
#3
Thread Starter
Member
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|