datagrid|下拉|下拉列表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.DropDown cmbFunctionArea.Dock = DockStyle.Fill;
cmbFunctionArea.SelectionChangeCommitted += new EventHandler(cmbFunctionArea_SelectionChangeCommitted);
dgtb.TextBox.Controls.Add(cmbFunctionArea);
}
在datagrid列中添加下拉列表
80酷酷网 80kuku.com