I\'m having some problem to get the index of the selected row in a listview. I wonder why this code isn\'t working? I get a red line below the SelectedIndex
Try :
listView1.FocusedItem.Index
This give you the index of the selected row.