Collapsible panel issue

Last post 06-20-2008 4:33 PM by RajVedula. 4 replies.

Sort Posts:

  • Collapsible panel issue

    10-31-2007, 2:32 PM
    • Member
      1 point Member
    • squ
    • Member since 08-14-2007, 7:39 PM
    • Posts 4

    Hi, I'm using the ajax control toolkit's CollapsiblePanelExtender, and I'm having some problems. The issue is that panels with "Collapsed="true"" are showing up as expanded while the page is loading, and then once everything else on the page has finished loading, it collapses. I need it to be collapsed during the loading of the page, as it seems to do on the sample site: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CollapsiblePanel/CollapsiblePanel.aspx .  Does anyone have any experience with this, or any suggestions?

     

    Thanks,

    - Jared 

    Filed under:
  • Re: Collapsible panel issue

    10-31-2007, 10:18 PM
    Answer
    • Star
      7,685 point Star
    • agolden
    • Member since 08-03-2002, 10:56 AM
    • Houston, TX
    • Posts 1,036

    Hi Jared,

    I usually apply a style of height: 0 and overflow: hidden to the container with the collapsed content and that does it.

    Hope that helps.

    Aaron

    Don't forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so everyone will know you have been helped.
  • Re: Collapsible panel issue

    11-01-2007, 1:36 PM
    • Member
      1 point Member
    • squ
    • Member since 08-14-2007, 7:39 PM
    • Posts 4
    I tried that before and it didn't work, but this time I put the overflow:hidden in a css file (instead of directly on the element) and that did the trick! Thanks!
  • Re: Collapsible panel issue

    12-17-2007, 2:40 PM
    • Member
      27 point Member
    • Noonway
    • Member since 12-12-2006, 4:44 PM
    • Louisville, KY
    • Posts 10

     

    Panel1.Style.Add("height", "0");
     

    Worked like a charm for me in C#... Thanks!  Smile

  • Re: Collapsible panel issue

    06-20-2008, 4:33 PM
    • Member
      18 point Member
    • RajVedula
    • Member since 06-20-2008, 4:19 PM
    • Posts 8

    I tried that in Page Load but didnt work for me still see the flahing of the panel.

    <div >

    <asp:Panel ID="TitlePanel" runat="server" CssClass="collapsePanelHeader">

    &nbsp;&nbsp;<asp:Image ID="Image1" runat="server" ImageUrl="./interface/buttonImage/expand_blue.jpg"/>

    Display Lessons&nbsp;&nbsp;

    <asp:Label ID="Label2" runat="server">(Show Details...)</asp:Label>

    </asp:Panel>

    <cc1:CollapsiblePanelExtender ID="cpe" runat="Server"

    CollapsedSize="0"

    ExpandedSize="300"

    TargetControlID="ContentPanel"

    ExpandControlID="TitlePanel"

    CollapseControlID="TitlePanel"

    Collapsed="True"

    TextLabelID="Label2"

    ExpandedText="(Hide Details...)"

    ImageControlID="Image1"

    ExpandedImage="./interface/buttonImage/collapse_blue.jpg"

    CollapsedImage="./interface/buttonImage/expand_blue.jpg"

    AutoCollapse = "true"

    SuppressPostBack="true">

    </cc1:CollapsiblePanelExtender>

    </div>

     

    <div>

    <asp:Panel ID="ContentPanel" runat="server" CssClass="collapsePanel" >

    Some content is displayed here!!!

    lesson1

    lesson2

    lesson3

    <div class="lefttreeMenu" >

    <IFRAME id="iframe1" marginWidth="0" frameBorder="no" width="99%" height="345"

    runat="server"> </IFRAME>

    <IFRAME id="iframe2" marginWidth="0" src="http://www.google.com" frameBorder="no" runat="server">

    </IFRAME>

    </div>

    </asp:Panel>

     

    </div>

     

Page 1 of 1 (5 items)