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

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.
Who is Participating?
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)

ArunVashistAuthor Commented:
Hi Dhaest,

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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.