Couldn't see how VB.NET allows you to get the SubItem Index (column index) following a click event in a ListView.
Used the following function to resolve this issue :
Private Function GetSubItemIndex(ByVal x As Integer, ByVal lv As ListView) As Integer
Dim c As Integer = 0
Dim col As ColumnHeader
For Each col In lv.Columns
c = c + col.Width
If x < c Then Exit For
Next
If x > c Then
GetSubItemIndex = -1
Else
GetSubItemIndex = col.Index
End If
End Function
Hope this helps anyone !
Used the following function to resolve this issue :
Private Function GetSubItemIndex(ByVal x As Integer, ByVal lv As ListView) As Integer
Dim c As Integer = 0
Dim col As ColumnHeader
For Each col In lv.Columns
c = c + col.Width
If x < c Then Exit For
Next
If x > c Then
GetSubItemIndex = -1
Else
GetSubItemIndex = col.Index
End If
End Function
Hope this helps anyone !