我想在现有的datagridview中添加新列,方法如下:
DataColumn col = new DataColumn(( dataGridView1.ColumnCount+1).ToString());
dataGridView1.Columns.Add(col);
但是它不起作用了..该怎么办?
DataGridViewCell
现在是抽象的。例如,使用DataGridViewTextBoxCell
创建一个单元格:DataGridViewCell cell = new DataGridViewTextBoxCell();
。 - Jürgen Müller