Solved

Double click event on column in datagrid

Posted on 2009-05-16
6
234 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

816 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

8 Experts available now in Live!

Get 1:1 Help Now