日期:2014-05-19  浏览次数:20412 次

满分吐血急求DataGrid中DropDownList的三级联动的思路,顶者有分,解决再开贴谢
<asp:TemplateColumn   HeaderText= "岗位 ">
<ItemTemplate>
<asp:Label   id=dd_bm   runat= "server "   Text= ' <%#   DataBinder.Eval(Container,   "DataItem.部门 ")   %> '>
</asp:Label>
<asp:Label   id=dd_bz   runat= "server "   Text= ' <%#   DataBinder.Eval(Container,   "DataItem.班组 ")   %> '>
</asp:Label>
<asp:Label   id=Label2   runat= "server "   Text= ' <%#   DataBinder.Eval(Container,   "DataItem.岗位 ")   %> '> </asp:Label> </ItemTemplate> <FooterTemplate> <asp:DropDownList   id=diaodong_mydown1   runat= "server "   Width= "58px "   Height= "45px "> </asp:DropDownList> <asp:DropDownList   id= "diaodong_mydown2 "   runat= "server "   Width= "70px "   Height= "45px "> </asp:DropDownList <asp:DropDownList   id= "diaodong_mydown3 "   runat= "server "   Width= "80px "   > </asp:DropDownList> </FooterTemplate>
<EditItemTemplate>
                        ....
</EditItemTemplate> </asp:TemplateColumn>

单纯的三级联动能做到,但是跟DataGrid连用就一头雾水,求高人指条路
顶者有分,解决再开满分贴答谢

------解决方案--------------------
沙发............
------解决方案--------------------
虽然不懂..... 等带高人来 指点
------解决方案--------------------
帮顶 来抢分了
------解决方案--------------------
<FooterTemplate> <asp:DropDownList AutoPostBack= "true " id= "diaodong_mydown1 " runat= "server " OnSelectedIndexChanged= "diaodong_mydown1_SelectedIndexChanged " Width= "58px " Height= "45px "> <asp:ListItem value= "1 "> A </asp:ListItem> <asp:ListItem value= "2 "> B </asp:ListItem> </asp:DropDownList> <asp:DropDownList AutoPostBack= "true " id= "diaodong_mydown2 " runat= "server " OnSelectedIndexChanged= "diaodong_mydown2_SelectedIndexChanged " Width= "70px " Height= "45px "> <asp:ListItem value= "1 "> AA </asp:ListItem> <asp:ListItem value= "2 "> BBB </asp:ListItem> </asp:DropDownList> <asp:DropDownList id= "diaodong_mydown3 " runat= "server " Width= "80px " > <asp:ListItem value= "1 "> AAA </asp:ListItem> <asp:ListItem value= "2 "> BBB </asp:ListItem> </asp:DropDownList> </FooterTemplate> protected void diaodong_mydown1_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddl = (DropDownList)sender; DropDownList ddl1 = (DropDownList)ddl.Parent.FindControl( "diaodong_mydown2 "); ddl1.SelectedValue = ddl.SelectedValue; diaodong_mydown2_SelectedIndexChanged(ddl1, e); } protected void diaodong_mydown2_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddl = (DropDownList)sender; DropDownList ddl1 = (Dro