Hi mortaza.mkr,
It’s true that the DataGridView doesn’t have row click or row double click event.
I think what you want to do is that raising an event when the user click a selected row.
To do this, you can handle
CellClick event and check if the
DataGridView.CurrentRow is selected.
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
DataGridView dgv = sender as DataGridView;
if (dgv == null)
return;
if (dgv.CurrentRow.Selected)
{
//do you staff.
}
}
If there is anything unclear, please let me know.
Beset Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
