ListView -Selected Item.

lester

Member
Joined
May 29, 2003
Messages
9
Im new to VB.net can someone pls let me know how can I get the index of the selected item in the listview??

TIA.
 
Code:
If ListView1.SelectedItems.Count > 0 then
    Msgbox("Selected index is " & ListView1.SelectedItems(0).Index())
end if

A message box would display the first selected item in the listview after first checking if more than 1 row is selected.

Andy.
 
Back
Top