title: How can I pass a listview from one form to another form?
body: <p>I have 2 forms. form1 and form2. There is a button at form1 for me to access to form2 and in form2, I have a listview2 and some textboxes. I manage to input items into listview2. Then when I click on the OK button in form2, listview1 in form1 should show exactly like listview2. So guys, can anyone suggest me a way to do this? Thanks</p>
  
  <p>Below are my codes. I hope I don't confuse you all.</p>
  
  <p>Form1 code =></p>
  
  <pre><code>namespace MainServerPage
  </code></pre>
  
  <p>{
      public partial class MainServerPage : Form
      {
          public ListView LV;<br>
          public MainServerPage()
          {
              InitializeComponent();
          }</p>
  
  <pre><code>    private void btnAdd_Click(object sender, EventArgs e)
      {
          AddItem Add = new AddItem(this);                //to open form2
          Add.ShowDialog();
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Form2 code =></p>
  
  <pre><code>namespace MainServerPage
  </code></pre>
  
  <p>{
      public partial class AddItem : Form
      {
          MainServerPage currentform;   //I learn this way of passing form to another but it's not working
          public AddItem(MainServerPage incomingform)
          {
              currentform = incomingform;
              InitializeComponent();
          }</p>
  
  <pre><code>    private void btnUpdate_Click(object sender, EventArgs e)
      {
          ListViewItem item = new ListViewItem(txtCode.Text);
          item.SubItems.Add(txtLocation.Text);
          item.SubItems.Add(cbxStatus.Text);
          item.SubItems.Add(txtWeatherHigh.ToString());
          item.SubItems.Add(txtWeatherLow.ToString());           
  
          listView2.Items.Add(item);      //send to listView2
  
          txtCode.Text = "";
          txtLocation.Text = "";
          cbxStatus.Text = "";
          txtWeatherHigh.Text = "";
          txtWeatherLow.Text = "";
          cbxZone.Text = "";                     
  
      }
  
      private void btnOk_Click(object sender, EventArgs e)
      {
           currentform.LV = load;    //I got stuck here...do not know what to do
      }
  }
  </code></pre>
  
  <p>}</p>