DataGridView动态添加行和列

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...
2011-10-26 23:05 | 阅读 780 次 | 评论 0 条
最新评论