1,添加列
DataGridViewTextBoxColumn acCode = new DataGridViewTextBoxColumn();acCode.Name = "acCode"; //列的名字acCode.DataPropertyName = "acCode";acCode.HeaderText = "A/C Code"; //列标题dataGridView1.Columns.Add(acCode); //把新建的列添加到控件中
2,添加行
DataGridViewRow dr = new DataGridViewRow();dr.Crea...