Hi,
i have a listview ( view property set to Details ) fully populated and i want to be able to, when the listview item is changed it to tell me whats in the second column along. To do this i have used..
VB Code:
Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged MsgBox(ListView1.SelectedItems.Item(0).SubItems(1).Text) End Sub
Now if i click on a item in the listview, it popups a msgbox telling whats in the second column along, but if i then choose another item i get the following error
Additional information: Specified argument was out of the range of valid values.
can someone please explain what im doing wrong




Reply With Quote