DataGridViewColumn column = new DataGridViewColumn();
column.Name = "booksInfoArea";
column.HeaderText = "区域";
dataGridView1.Columns.Add(column);
报错: 指定的列CellType为空
但是我:column.CellType="";为其赋值
报错:CellType是只读属性请问则么解决?
搞定就结贴,在线等!
column.Name = "booksInfoArea";
column.HeaderText = "区域";
dataGridView1.Columns.Add(column);
报错: 指定的列CellType为空
但是我:column.CellType="";为其赋值
报错:CellType是只读属性请问则么解决?
搞定就结贴,在线等!
DataGridViewTextBoxColumn txt= new DataGridViewTextBoxColumn();
txt.Name = "booksInfoArea";
txt.HeaderText = "区域";
dataGridView1.Columns.Insert(1, txt);