救命::DataGrid 中放了一 DropDownLis 如何在程序如何对其操作,例如动态添加内容?
wdcby 2003-09-29 11:33:28 为什么我在 DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)事件中写下面这句代码以执行
((DropDownList)e.Item.FindControl("sltState")).Items.Add("cby");
而在 DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) 事件中写就出错,说未将对象的引用用到具体的实例。
请问我要动态对这个DropDownList("sltState") 操作,我该如何作,谢谢各位了。