title: How to update values of an existing Item in a ListView?
body: <p>I am working on a little project and I have to add an item with some values into a ListView.<br>
  I want to be able to update the values of an Item if it is added again and not read the same Item with different details again. </p>
  
  <p>Below is the code I have managed to come up with thus far:  </p>
  
  <pre><code>For Each item as ListViewItem in MainListView.Items
      If item.SubItems(0).Text = ItemCode Then
         item.SubItems(3).Text += ItemQty
         item.SubItems(5).Text += ItemPrice
      Else
         ' normal listview insert codes run here
      End If
  Next
  </code></pre>
  
  <p>As it stands now, the values are only able to update if the Item is first on the list but once it moves a step downwards, the similar Item also inserts into the ListView with it's own records instead of finding and updating the already existing one. </p>
  
  <p>Any help to rectify it would be greatly appreciated. Thanks.</p>