Solved

Double click event on column in datagrid

Posted on 2009-05-16
6
235 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

791 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