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)
  {
  
  }


}
向上面这样写根本就触发不了

posted on 2004-09-18 17:19  feeling  阅读(872)  评论(1编辑  收藏  举报

导航