http://expert.csdn.net/Expert/topic/822/822023.xml?temp=.197796

解决方案 »

  1.   

    to  csdn_bob(文子)无法找到网页
      

  2.   

    你可以在ItemDataBind中,找到你的子控件,之后按一般的DropDownList进行数据绑定就可以了
      

  3.   

    还是行,如下:
    SqlDataReader myReader;
    int i=myExaminee.List(out myReader);
    this.dgList.DataSource=myReader; DropDownList selUnite1=(DropDownList)e.Item.FindControl("selUnite");
    selUnite1.DataTextField="准考证号";
    selUnite1.DataValueField="姓名";
    this.dgList.DataBind();
    myExaminee.CloseConnection();
      

  4.   

    刚才是字写错啦,还是不行,报错信息为:
    『selUnite1.DataTextField="准考证号";』未将对象引用设置到对象的实例
      

  5.   

    在你的OnItemDataBind下首先使用FindControl找到你的ddl,然后给他根据当前值,给他设置初始值即可。相同的帖子论坛里有很多,找找吧,我都回答了N遍了,呵呵  :)