can anyone help me in adding items to a listview?
here is what i want to do: when i click the login button the date and time will be added in the column date and time in, here is my code and it worksClick Here:
Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginButton.Click
For Each item As ListViewItem In TimeSheetListView.Items
Select Case True
Case item.SubItems(0).Text = dates.Text
Return
Case item.SubItems(1).Text = time.Text
Return
End Select
Next
Dim lv As ListViewItem = TimeSheetListView.Items.Add(dates.Text)
lv.SubItems.Add(time.Text)
lv.SubItems.Add(time.Text)
If TimeSheetListView.Items.Count >= 1 Then
MsgBox("You are logged in.", MsgBoxStyle.Information, "Message")
LoginButton.Enabled = False
LogoutButton.Enabled = True
End If
End Sub
my problem is the log out button, i want to add the time, in the time out column but i dont know how
i had attach a printscreen of my work..hope anyone can help