2
Contributors
3
Replies
7
Views
5 Years
Discussion Span
Last Post by Begginnerdev
0

Handle the listview's Click event

Example:

    Private Sub ListView1_Click(sender As System.Object, e As System.EventArgs) Handles ListView1.Click
    'Refernces the selected record
    Try
        If IsNothing(ListView1.SelectedItems) = False Then
            For Each sItem As ListViewItem In ListView1.SelectedItems
                If sItem.Subitem(3).Text.ToLower() = "fail" Then
                    MsgBox("Failing grade!")
                End If
            Next
        End If
    Catch ex As Exception
        MsgBox("There was a problem referencing the entry!" & vbCrLf & ex.Message)
    End Try
End Sub

Edited by Begginnerdev

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.