I have populated a datagrid but would like an event to fire when the user double clicks the row and highlights it. I have looked through all the properties but cannot seem to work out which one it is.

I've also looked on MSDN but also cannot see anything.

Many Thanks,

Sam

The problem with CellDoubleClick is it won't fire an event for keyboard users when navigating with arrows.

Instead, some other events you can handle are:

You can poke around when each fires by attaching handlers to each event and writing to the output window:

dataGridView1.RowEnter += dgv_RowEnter;
dataGridView1.SelectionChanged += dgv_SelectionChanged;
dataGridView1.RowStateChanged += dgv_RowStateChanged;
dataGridView1.CellContentClick += dgv_CellContentClick;

private void dgv_RowEnter(object sender, DataGridViewCellEventArgs e)
{
    Debug.WriteLine("RowEnter");
}

private void dgv_SelectionChanged(object sender, EventArgs e)
{
    Debug.WriteLine("SelectionChanged");
}

private void dgv_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
{
    Debug.WriteLine("RowStateChanged");
}

private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
    Debug.WriteLine("CellContentClick");
}