C#中DataGridView动态添加行及添加列的方法
2021-07-16 06:11
标签:item ring lin new border nta table sha data http://www.jb51.net/article/72259.htm Datagridview添加列: Datagridview创建行: C#中DataGridView动态添加行及添加列的方法 标签:item ring lin new border nta table sha data 原文地址:https://www.cnblogs.com/LuoEast/p/8213562.html
DataGridViewTextBoxColumn acCode = new DataGridViewTextBoxColumn();
acCode.Name = "acCode";
acCode.DataPropertyName = "acCode";
acCode.HeaderText = "A/C Code";
dgvVouchers.Columns.Add(acCode);
DataGridViewRow dr = new DataGridViewRow();
dr.CreateCells(dgvVouchers);//添加的行作为第一行dgvVouchers.Rows.Insert(0, dr);//添加的行作为最后一行dgvVouchers.Rows.Add(dr_new);
文章标题:C#中DataGridView动态添加行及添加列的方法
文章链接:http://soscw.com/index.php/essay/105904.html