title: Replacing listview items with another list using combo box
body: <p>Pardon for being novice at vb.net. I have a combo box and a list view. What I needed is when I change the category in the combo box and pressed 'OK', the old list added before will be replaced by a new list. </p>
  
  <pre><code>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  
      Dim i As ListViewItem
  
      If ComboBox1.Text = "Terrestrial Ecotoxicity (Freshwater)" Then
  
          i = ListView1.Items.Add("Water")
          i.SubItems.Add("2068.030567")
          i.SubItems.Add("0")
          i.SubItems.Add("0")
  
      ElseIf ComboBox1.Text = "Terrestrial Ecotoxicity (Seawater)" Then
  
          i = ListView1.Items.Add("Dimethylamine")
          i.SubItems.Add("1229.539887")
          i.SubItems.Add("0.000122731")
          i.SubItems.Add("0.15090266")
  
      End if
  
  End Sub
  </code></pre>
  
  <p>What should I need to add?</p>