DataGridViewButtonColumn添加单击事件

 

 

 

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if   (e.ColumnIndex   ==   dataGridView1.Columns[5].Index)
                MessageBox.Show(e.RowIndex.ToString());

        }

你可能感兴趣的:(DataGridViewButtonColumn添加单击事件)