Repeater嵌套的RadioButtonList SelectedIndexChanged事件,我判断当RadioButtonList.SelectedValue=="3"时把Repeater的Item中的id值传给Repeater外面的一个GridView,让GridView根据传过来的id绑定数据,这个功能怎么实现呀?希望大家能帮帮我!!!!!谢谢大家了!!!!

解决方案 »

  1.   

    写一个gridview绑定的方法参数为ID然后在SelectedIndexChanged中用RadioButtonList.parent来获取外层控件
    最后根据选中列来获取ID,再调用gridview绑定方法传入参数就可以了
      

  2.   

    关键是SelectedIndexChanged这个事件找不到嵌套在Repeater中的RadioButtonList 它的事件找不到,貌似要写到Repeater_ItemCommand中,我不太清楚怎么写
      

  3.   

    而且当RadioButtonList.SelectedValue=="3"时会解发一个事件
      

  4.   

    不好意思,刚有点事!事件可以找到,你在前台页面点击编辑datalist的模板,然后右键RadioButtonList的属性,在属性窗口就可以找到事件。外层datalist的事件与RadioButtonList的事件无关
    你直接写好你的RadioButtonList事件就行
    Repeater_ItemCommand事件是绑定你RadioButtonList数据的时候写的
      

  5.   

    事件可以找到,你在前台页面点击编辑datalist的模板,然后右键RadioButtonList的属性,在属性窗口就可以找到事件。外层datalist的事件与RadioButtonList的事件无关
    你直接写好你的RadioButtonList事件就行
    Repeater_ItemCommand事件是绑定你RadioButtonList数据的时候写的