private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex==4 && ((DataGridView)sender).Columns[e.ColumnIndex].GetType() == typeof(DataGridViewButtonColumn)) { DataGridViewRow row = (DataGridViewRow)dataGridView1.Rows[0].Clone(); dataGridView1.Rows.Add(row); } }
e.ColumnIndex==4
typeof(DataGridViewButtonColumn)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)