![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 //新建一个数据行 2 DataGridViewRow row=new DataGridViewRow(); 3 4 //复制单元格 5 row.CreateCells(dgv); 6 7 //添加数据 8 row.Cells[0].Value="数据1"; 9 row.Cells[1].Value="数据2"; 10 。。。 11 12 //将该行添加到界面中 13 this.dgv.Rows.Add(row);
1 //新建一个数据行 2 DataGridViewRow row=new DataGridViewRow(); 3 4 //复制单元格 5 row.CreateCells(dgv); 6 7 //添加数据 8 row.Cells[0].Value="数据1"; 9 row.Cells[1].Value="数据2"; 10 。。。 11 12 //将该行添加到界面中 13 this.dgv.Rows.Add(row);
转载于:https://www.cnblogs.com/shuyajun/archive/2012/07/12/2588170.html