Hi All,
I have a list view control in which I have create three columns.
I have three text boxes, user can enter data into these text boxes & click the button. On the button click the data in the text boxes gets added to the list view a new row.
Now, my issue is first when I enter data in the text boxes & click the button then data gets added to the listview perfectly. But when I click the button again then only first column in the list view gets populated, col 2 & col 3 do not populated...!!!! even though the textboxes 2 & 3 have data ..
VB.NET:
Public Class Form1
Private Sub btnAddItems_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddItems.Click
Lview.Items.Add(txtItem1.Text)
Lview.Items(0).SubItems.Add(txtItem2.Text)
Lview.Items(0).SubItems.Add(txtItem3.Text)
End Sub
End Class
I am using Visual Studio 2010.
Please let me know where am I going wrong.
Regards
Sudhir
Last edited: