I am having a button cell in datagridview.When that button is clicked,another datagridview should be visible .For every button click in the button column,the data in new dat
use dataGridView1_CellContentClick instead of dataGridView1_CellClick
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 8) //make sure button index here
{
//write your code here
}
}