5.5 How can I put a combobox in a column of a datagrid?
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q480q

解决方案 »

  1.   

    将该列设为模版列,然后编辑模版,在该列中加入一个DropDownList控件DropDownList1.
    在datagrid的绑定事件datagrid_itemdatabound中:
    if (e.Item.ItemIndex >= 0)
    {
     DropDownList ddl=(DropDownList)e.Item.Cells[模版列的标号,第一列为0].FindControl("DropDownList1");
     然后可以定义一个变量int sex=ddl.selectindex//例如男为0女为1,就可以了
      

  2.   

    结帖!(本人意思是在Win Form中)