datalist模版列中的dropdownlist如何处罚他的change事件 来改变模版列中的另一个dropdownlist
private void yourGridItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DropDownList ddl = (DropDownList )e.Item.FindControl("yourDropDownList");
ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
}
private void ddl_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
}
向上面这样写根本就触发不了