//笔记、非原创
private void AddGrdComBox()//在datagrid列中添加下拉列表
{
DataGridTextBoxColumn dgtb = (DataGridTextBoxColumn)grd_please.TableStyles[0].GridColumnStyles[8]; //8是列的序号
ComboBox cmbFunctionArea = new ComboBox();
cmbFunctionArea.Items.AddRange(new object[]{"正本","副本","原稿"});
cmbFunctionArea.Cursor = Cursors.Arrow;
cmbFunctionArea.DropDownStyle= ComboBoxStyle.DropDownList;
cmbFunctionArea.Dock = DockStyle.Fill;
cmbFunctionArea.SelectionChangeCommitted += new EventHandler(cmbFunctionArea_SelectionChangeCommitted);
dgtb.TextBox.Controls.Add(cmbFunctionArea);
}
原文链接:https://blog.csdn.net/csdnatm/article/details/141760