I was testing to get the values from the ListView which works fine when double-clicking a row in the MouseDoubleClick_event, but in the SelectedIndexChange_event it crashes. I get an error that the value of "0" is not valid for the index.
vb.net Code:
Private Sub lstv_gegevens_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstv_gegevens.SelectedIndexChanged MsgBox(lstv_gegevens.SelectedItems(0).SubItems(2).Text) End Sub





Reply With Quote