I want to edit the data into the ListView of the first item. when i right click on item..But when i right click selected item not come in edit mode....Plz check it out..

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For lcount As Integer = 1 To 3
            ListView1.Items.Add(lcount.ToString, lcount - 1)
        Next
    End Sub

 Private Sub ListView1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseClick
        If e.Button = Windows.Forms.MouseButtons.Right Then
            Dim ht As ListViewHitTestInfo = ListView1.HitTest(location)
            If ht.Location = ListViewHitTestLocations.Label Then
                ListView1.LabelEdit = True
                ht.Item.BeginEdit()
            End If
        End If
    End Sub

where comes "location" from? did you set it as global variable? if not then this is might be the problem. else check if the location got the correct value.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.