View Code
 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);

 

posted on 2012-07-12 15:14  捣乃忒  阅读(766)  评论(0编辑  收藏  举报