Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Multiple CollapsepanelExtender use on same page but extend only one CollapsiblePanelExtenderat a time..
 
I am using Repeater and each repeater row have a CollapsiblePanelExtenderextender.
I want a time one panel extend.
 

Thanks for reply in advance.
Posted 30-Jan-13 22:29pm
Comments
Trics071 at 31-Jan-13 4:47am
   
just put whole repeater control in a panel use this panel as target control for your panel extender.
Gittu Dash at 31-Jan-13 5:10am
   
Provide the implemented code here, so that it'll be easy to track down the Error.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Quote:
First CollapsiblePanelExtender Control

<ajaxtoolkit:collapsiblepanelextender id="CollapsiblePanelExtender1" runat="server" behaviorid="PanelExtender1" xmlns:ajaxtoolkit="#unknown">
CollapseControlID="pnlClick" Collapsed="true" ExpandControlID="pnlClick" TextLabelID="lblMessage"
CollapsedText="Show" ExpandedText="Hide" ImageControlID="Image1" ExpandDirection="Vertical"
TargetControlID="pnldata" ScrollContents="false">
 

 
Second CollapsiblePanelExtender Control

 
<ajaxtoolkit:collapsiblepanelextender id="CollapsiblePanelExtender2" runat="server" behaviorid="PanelExtender2" xmlns:ajaxtoolkit="#unknown">
CollapseControlID="pnlClick1" Collapsed="true" ExpandControlID="pnlClick1" TextLabelID="lblMessage"
CollapsedText="Show" ExpandedText="Hide" ImageControlID="Image1" ExpandDirection="Vertical"
TargetControlID="pnldata" ScrollContents="false">
 

 
Both Collapse Extender have behaviour id which help to meet requirement that is if we use more than one collapse extender on same page then at a time only one extend and other is close.By using this script

<script>

 
function pageLoad(sender, args) {
extenders[0] = $find("PanelExtender1");
extenders[1] = $find("PanelExtender2");

 
// WWB: Hook All The Extenders, If extenders[i] is null then
// the extenders is not being displayed -- i.e. not visible
for (var i = 0; i < extenders.length; i++)
if (extenders[i] != null)
extenders[i].add_expandComplete(expandHandler);
}

function expandHandler(sender, args) {
for (var i = 0; i < extenders.length; i++) {
if ((extenders[i] != null) && (extenders[i] != sender))
extenders[i]._doClose();
}
}

</script>
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 515
1 OriginalGriff 498
2 Abhinav S 305
3 sanket saxena 295
4 thatraja 235
0 Sergey Alexandrovich Kryukov 8,482
1 OriginalGriff 4,830
2 Peter Leow 3,794
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid