Solved

Double click event on column in datagrid

Posted on 2009-05-16
6
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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