private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewColumn column = dataGridView1.Columns[e.ColumnIndex]; if (column is DataGridViewButtonColumn) { //这里可以编写你需要的任意关于按钮事件的操作~ MessageBox.Show("按钮被点击"); } } }