本文介绍了Repeaters中的CollapsiblePanelExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<asp:Repeater ID ="rptrTaskMap" runat="server" DataSourceID="TaskPhaseDS" OnItemDataBound="rptrTaskMap_itemDataBound">
<ItemTemplate>
<asp:HiddenField ID="hfPhase_id" runat="server" Value='<%# Eval( "id" )%>' />
<asp:HiddenField ID="hfPhase_Desc" runat="server" Value='<%# Eval( "description" )%>' />
<asp:Panel ID="pnlHeader" runat="server" BackColor=" Red">
<%# Eval( "description" )%>
</asp:Panel>
<ajax:CollapsiblePanelExtender ID="CollapsTaskMap" runat="server" ExpandedText="Expanded" CollapsedText="Collapsed"
TargetControlID="pnlHeader">
</ajax:CollapsiblePanelExtender>
</ItemTemplate>
</asp:Repeater>
ajax:CollapsiblePanelExtender is not working. It works if i place ajax:CollapsiblePanelExtender out side repeater. please help me.
Thanks,
Manu
推荐答案
<asp:Repeater ID ="rptrTaskMap" runat="server" DataSourceID="TaskPhaseDS" OnItemDataBound="rptrTaskMap_itemDataBound">
<ItemTemplate>
<asp:HiddenField ID="hfPhase_id" runat="server" Value='<%# Eval( "id" )%>' />
<asp:HiddenField ID="hfPhase_Desc" runat="server" Value='<%# Eval( "description" )%>' />
<asp:Panel ID="pnlHeader" runat="server">
<asp:Label ID="lblText" runat="server" Text='<%# Eval( "description" )%>' />
<asp:Image ID="ImgExpand" EnableTheming="false" AlternateText="Expand" runat="server" ImageUrl="~/Images/expand.png" e />
<asp:Image ID="ImgCollapse" EnableTheming="false" AlternateText="Collampse" runat="server" ImageUrl="~/Images/collapse.png" />
</asp:Panel>
<asp:Panel ID="pnlBody" runat="server" BackColor=" Red">
Body!!
</asp:Panel>
<ajax:CollapsiblePanelExtender ID="CollapsTaskMap" runat="server" ExpandedText="Expanded" CollapsedText="Collapsed"
TargetControlID="pnlBody" ExpandControlID="ImgExpand" CollapseControlID="ImgCollapse">
</ajax:CollapsiblePanelExtender>
</ItemTemplate>
</asp:Repeater>
这篇关于Repeaters中的CollapsiblePanelExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!