Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27027

VS 2010 ListView Selected column

$
0
0
Hi,
I have a listview item with 6 columns.
I want when clicking one of the six columns to get the index of the column or even the first entry of the column (if thats simple).
I have searched and i found on moucedownhandler

Code Code:
  1. Private Sub MainList_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles MainList.MouseDown
  2.         Dim ht As ListViewHitTestInfo = MainList.HitTest(e.Location)
  3.         Select ht.Location
  4.             Case ListViewHitTestLocations.Label
  5.                 MsgBox("text = " & Chr(34) & ht.SubItem.Text & Chr(34))
  6.         End Select
  7.     End Sub

But this is not what i want.
Any ideas?
Regards

Viewing all articles
Browse latest Browse all 27027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>