//Datagridview添加列 DataGridViewTextBoxColumn acCode = new DataGridViewTextBoxColumn(); acCode.Name = "acCode"; acCode.DataPropertyName = "acCode"; acCode.HeaderText = "A/C Code"; dgvVouchers.Columns.Add(acCode); //Datagridview创建行 //DataGridViewRow dr = new DataGridViewRow(); //dr.CreateCells(dgvVouchers); //添加的行作为第一行 //dgvVouchers.Rows.Insert(0, dr); //添加的行作为最后一行 //dgvVouchers.Rows.Add(dr_new);
?