John Gates, CISSP, CDPSE
asked on
Listview question
I am having problems with what I think should be a simple thing to figure out.. Anyway I would like to view the record below a selected list view item for comparison.
I know for the selected item it is:
ListView1.SelectedItems.It em(0).ToSt ring()
but how could you read the item(s) on the line below as well?
Thanks in advance!
-D-
I know for the selected item it is:
ListView1.SelectedItems.It
but how could you read the item(s) on the line below as well?
Thanks in advance!
-D-
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To check that, you need to check the index of the current item against the total number of items in the list:
Dim objItem As Object
If ListView1.SelectedItems.It em(0).Inde x <> ListView1.Items.Count - 1 Then
objItem = ListView1.Items(ListView1. SelectedIt ems.Item(0 ).Index + 1)
Else
MsgBox("You are at the last item")
End If
Dim objItem As Object
If ListView1.SelectedItems.It
objItem = ListView1.Items(ListView1.
Else
MsgBox("You are at the last item")
End If
ASKER
Thank you for your help 8)
ASKER