How do I properly bind ObservableCollection to listview?

How to have ListView items enter into another Listview on a diffrent form in vb?

  • I have a ListView on one of my forms in vb and i need the info that gets typed into it from a text box which i already have set up to go to a different form and enter into another ...show more

  • Answer:

    Sample code of passing LISTVIEW1 items to LISTVIEW2: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim li As ListViewItem For Each li In Me.ListView1.Items Me.ListView2.Items.Add(li.Text) Next End Sub '---CODE VERIFIED AND TESTED USING VISUAL BASIC 2005

QUFWFHYKJHLSGV362KTR7DY3OU at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

I dont know VB, but just save the entries in a global variable(s), then populate the list view when you switch to the other form. Thats how I do it in C++.

justme

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.