Instead of using the button click event,try using CellContentClick
this.dataGrid1.CellContentClick += new DataGridViewCellEventHandler(dataGrid1_CellContentClick);
And then in the event handler,ask if it's your button cell
void dataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == this.dataGrid1.Columns["ButtonColumn"].Index )
{
}
}
EDIT: That was for winforms. In asp.net refer this
http://msdn.microsoft.com/en-us/library/vstudio/bb907626(v=vs.90).aspx[
^] Hope it helps.