DataGridViewComboBoxColumn comcol = new DataGridViewComboBoxColumn();
comcol.DisplayMember = "TEXT";
comcol.ValueMember = "VALUE";
DataTable dt = new DataTable();
dt.Columns.Add( "TEXT" );
dt.Columns.Add( "VALUE" );
DataRow row = dt.NewRow();
row["TEXT"] = "1";
row["VALUE"] = "a";
dt.Rows.Add( row );
row = dt.NewRow();
row["TEXT"] = "2";
row["VALUE"] = "b";
dt.Rows.Add( row );
comcol.DataSource = dt;
dataGridView1.Columns.Add( comcol );
----------------------------------------------------
comcol.DataPropertyName是设置dataGridView1绑定表对应的列
comcol.DisplayMember = "TEXT";
comcol.ValueMember = "VALUE";
DataTable dt = new DataTable();
dt.Columns.Add( "TEXT" );
dt.Columns.Add( "VALUE" );
DataRow row = dt.NewRow();
row["TEXT"] = "1";
row["VALUE"] = "a";
dt.Rows.Add( row );
row = dt.NewRow();
row["TEXT"] = "2";
row["VALUE"] = "b";
dt.Rows.Add( row );
comcol.DataSource = dt;
dataGridView1.Columns.Add( comcol );
----------------------------------------------------
comcol.DataPropertyName是设置dataGridView1绑定表对应的列