Solved

Double click event on column in datagrid

Posted on 2009-05-16
6
232 Views
Last Modified: 2012-05-07
How do I write the code to check if a user double clicks in a certain column ...let's column index of 3??
0
Comment
Question by:rkckjk
  • 4
  • 2
6 Comments
 
LVL 12

Expert Comment

by:rgn2121
ID: 24401749
Is this a DataGridView?  
0
 
LVL 2

Author Comment

by:rkckjk
ID: 24401751
yes
0
 
LVL 12

Accepted Solution

by:
rgn2121 earned 500 total points
ID: 24401785
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 12

Expert Comment

by:rgn2121
ID: 24401790
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
 
LVL 2

Author Closing Comment

by:rkckjk
ID: 31582183
thanks!!!
0
 
LVL 12

Expert Comment

by:rgn2121
ID: 24401793
Also, I think if the user clicks a Column or Row header then the ColumnIndex = 0...
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now