Making a listView sub item clickable
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hello, Can you please tell me how can I MessageBox.Show the tag property of a listView item when a sub item is clicked? Thanks.
ListView.HitTest returns an object that contains a reference to the ListViewItem AND the ListViewSubItem that was clicked. If it was the first column, those will be the same; for subsequent columns, it will contain the correct item. You'll have to do some checking on those objects as it sets them to null sometimes and I forget now what the exact conditions are.