如何让datagrid的某一列显示为下拉列表框 5.5 How can I put a combobox in a column of a datagrid?http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q480q 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 将该列设为模版列,然后编辑模版,在该列中加入一个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,就可以了 结帖!(本人意思是在Win Form中) C#问题:请教大家如何保存设置 关于.net三层架构解释 Winform注销问题 listbox 每项设定颜色问题 .net中DataTable赋值为何不成功呢 C#实现摄像头拍照功能 拍照按钮事件怎么写。(控件已经写好的) 如何用soap发送html片断? c# 反射 能修改只读属性? 【高分】问【事务】,相信困扰了很多人,不解决无所谓,大家一起来讨论【】【】 关于CrystalReport的问题(C#) 关于与SQL数据库连接的问题. 帮忙解释下这段代码。谢谢。。今天结帖!
在datagrid的绑定事件datagrid_itemdatabound中:
if (e.Item.ItemIndex >= 0)
{
DropDownList ddl=(DropDownList)e.Item.Cells[模版列的标号,第一列为0].FindControl("DropDownList1");
然后可以定义一个变量int sex=ddl.selectindex//例如男为0女为1,就可以了