Visual C#, Double click is not propery working on DataGridVies's row

Posted on 2009-04-28
Last Modified: 2013-12-17
Hi Friends,

I am working on a Visual C# project for windows. my current issue is I have a datagridview filled with records from database.

When I double click on any row another window launches and show me the details of that particular record. Everything work well but my current issue is with Double click.

If I click on the row where some text is present in cells then it works find but if I double click on empty cells its not working. please guide me to solve this issue.

I am using "Full row selection" mode, so once you click on any part of row whole row get selected but double click is only working when I click on some text in a row.

thanks in advance.
Question by:ArunVashist
    LVL 53

    Accepted Solution

    In which event are you watching ?

    void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        // Do something on double click, except when on the header.
        if (e.RowIndex == -1)


    Author Comment

    Hi Dhaest,

    Thanks buddy, actually I was using "dataGridView1_CellContentDoubleClick", but now its working.
    thanks for your prompt reply.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    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.

    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

    8 Experts available now in Live!

    Get 1:1 Help Now