Ah, ok, I think I get you now.
What you want to do is to click the button once, and add the "item second", then when you click the same button again?!?, you want to add the "item three".
If that is what you are trying to do, then I think you might want to re-think the execution of the code, as this does not seem very intuitive.
However, in order to get what you are asking for, the following code should work:
In order for the code in the second button to work, you need to first select the row that you want to update.Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim adi As New ListViewItem("") ' will add to column(0) adi.SubItems.Add("second") 'will add to column(1) adi.SubItems.Add("") 'will add to column(2) ListView1.Items.Add(adi) ListView1.View = View.Details End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ListView1.FocusedItem.SubItems(2).Text = "three" End Sub
That make sense?
Gary





Reply With Quote