110,533
社区成员
发帖
与我相关
我的任务
分享
public static void DataGridAddCobx(DataGridView DataGD, ComboBox Cobx)
{
try
{
DataGD.Controls.Add(Cobx);
Rectangle rect = DataGD.GetCellDisplayRectangle(DataGD.CurrentCell.ColumnIndex, DataGD.CurrentCell.RowIndex, false);
Cobx.Left = rect.Left;
Cobx.Top = rect.Top;
Cobx.Width = rect.Width;
Cobx.Height = rect.Height;
Cobx.Visible = true;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}