C#Winform技术,利用DataGridViewRow向DataGridView中添加数据

来源:互联网 发布:库存软件免费版 编辑:程序博客网 时间:2024/05/21 20:51
DataGridViewRow r1 = new DataGridViewRow();            r1.CreateCells(this.dataGridView1);            r1.Cells[0].Value = false;            r1.Cells[1].Value = type;            r1.Cells[2].Value = username;            r1.Cells[3].Value = idnumber;            r1.Cells[4].Value = gender;            r1.Cells[5].Value = phone;            r1.Cells[6].Value = area;                       this.dataGridView1.Rows.Add(r1);

1 0