添加行的方式大概有两种:
1、int index=this.dataGridView1.Rows.Add();
this.dataGridView1.Rows[index].Cells[0].Value ="1";
this.dataGridView1.Rows[index].Cells[1].Value ="2";
this.dataGridView1.Rows[index].Cells[2].Value ="监听";
2、DataGridViewRow row= new DataGridViewRow();
DataGridViewTextBoxCell textboxcell= new DataGridViewTextBoxCell();
textboxcell.Value= "aaa";
row.Cells.Add(textboxcell);
DataGridViewComboBoxCell comboxcell= new DataGridViewComboBoxCell();
row.Cells.Add(comboxcell);
dataGridView1.Rows.Add(row);