• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Double click event on column in datagrid

How do I write the code to check if a user double clicks in a certain column ...let's column index of 3??
0
Richard Kreidl
Asked:
Richard Kreidl
  • 4
  • 2
1 Solution
 
rgn2121Commented:
Is this a DataGridView?  
0
 
Richard KreidlSoftware DeveloperAuthor Commented:
yes
0
 
rgn2121Commented:
In the Double_Click event....
 

        If Not IsNothing(DataGridView1.CurrentCell) Then
            If DataGridView1.CurrentCell.ColumnIndex = 3 Then
 
            End If
        End If

Open in new window

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
rgn2121Commented:
This will work if they click in a cell...you would have to check if they have clicked on a column header.  Without really testing it, I can't say if there is anything else to check for..
0
 
Richard KreidlSoftware DeveloperAuthor Commented:
thanks!!!
0
 
rgn2121Commented:
Also, I think if the user clicks a Column or Row header then the ColumnIndex = 0...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now