Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Double click event on column in datagrid

Posted on 2009-05-16
6
Medium Priority
?
241 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:Richard Kreidl
[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:Richard Kreidl
ID: 24401751
yes
0
 
LVL 12

Accepted Solution

by:
rgn2121 earned 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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:Richard Kreidl
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

670 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