日期:2014-05-17 浏览次数:21104 次
((DataGridViewComboBoxCell)row.Cells["DBCol"]).Value = “value”;这句话没起作用呢?
DataGridViewComboBoxCell dc=new DataGridViewComboBoxCell();
dc.Items.Add("test1");
dc.Items.Add("test2");
dc.Value = "test2";//这一句
this.dataGridView1.Columns.Add("c1","h1");
this.dataGridView1.Rows.Add();
this.dataGridView1.Rows[0].Cells[0]= dc;