there is an event cellclick fr datagridview use that
private void datagridview1_CellClick(object sender, EventArgs e)
{
int col = this.dataGridView1.CurrentCell.ColumnIndex;
int row = this.dataGridView1.CurrentCell.RowIndex;
if ( col = 5)
{
MessageBox.Show("Button in Cell[" +
col.ToString() + "," +
row.ToString() + "] has been clicked");
}
}
Happy Coding!
:)