查找DDL SelectedIndexChanged事件的控件 [英] Find Control on DDL SelectedIndexChanged event
本文介绍了查找DDL SelectedIndexChanged事件的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我的Child Grid中有一个NestedGridView我的Footer模板中有一个名为DropDownList的控件,现在我想要的是我的DropDownSelectedIndexchanged事件我想获取子网格页脚控件。如何做到这一点任何人都可以给我一些解决方案..?
Hi Everybody,
I have a NestedGridView in my Child Grid i have a control called DropDownList in my Footer template , now what i want is in my DropDownSelectedIndexchanged event i want to fetch Child Grid footer control. How to do this can any one give me some solution out of this..?
<asp:DataGrid id="dg1" runat="server">
<columns>
<asp:templatefield>
<itemTemplate>
<asp:Label ID="lblid" runat="server" />
</itemtemplate>
</asp:Templatefield>
<asp:templateField>
<itemTemplate>
<asp:GridView id="gv2" runat="server">
<columns>
<asp:TemplateField>
<FooterTemplate>
<Asp:DropDownList id="ddl1" runat="server" önSelectedIndexChanged="ddl_SelectedIndexChanged" AutoPostBack="true"/>
</FooterTemplate>
<asp:templateField>
<asp:TemplateField>
<FooterTemplate>
<Asp:DropDownList id="ddl2" runat="server" />
</FooterTemplate>
<asp:templateField>
<columns>
</asp:GridView>
<itemtemplate>
<asp:templatefield>
</columns>
</asp:DataGrid>
现在在我的dropdwon选择索引更改事件中我想找到父网格控件lblId..
Now in my dropdwon selected index changed event i want to find the parent grid control "lblId"..
protected void ddl_SelectedIndexChanged(object sender,EventArgs e)
{
// here i want to find parent grid control "lblid".
}
任何人都可以给我一些解决方案..
Can anyone give me some solution out of this..
推荐答案
你可以使用行更新或行数据绑定这个
或者您可以将e.rowindex作为会话或视图状态传递
您可以将它传递给dropdwonlist的选定索引更改事件
You can use Row updating or row databound for this
or you can pass e.rowindex as a session or a viewstate
your can pass it to the selected index change event of the dropdwonlist
这篇关于查找DDL SelectedIndexChanged事件的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文