Results 1 to 4 of 4

Thread: [RESOLVED] CollapsiblePanelExtender wont collapse

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Resolved [RESOLVED] CollapsiblePanelExtender wont collapse

    I have a repeater with a collapsible panel, when you extend the panel an ajax call is done and the div is dynamically filled with content. As the content isnt available at page load the div has zero height auomaticaly.

    Code:
    <asp:Repeater runat="server" ID="rptIndividualRepairsLive">
                <HeaderTemplate>
                    <table class="grid">
                    <tr class="GridHeader">
                        <th scope="col">&nbsp;</th>
                        <th scope="col">Job Number</th>
                        <th scope="col">Date received</th>
                        <th scope="col">Due/next appointment</th>
                        <th scope="col">Completed</th>
                        <th scope="col">Status</th>
                        <th scope="col">Description</th>
                        <th scope="col">Cancel</th>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td><asp:LinkButton runat="server" ID="lnkExtend" Text="+" /></td>
                        <td><asp:literal runat="server" ID="litJobNO" /></td>
                        <td><asp:literal runat="server" ID="litDateReceived" /></td>
                        <td><asp:literal runat="server" ID="litNextApp" /></td>
                        <td><asp:literal runat="server" ID="litCompleted" /></td>
                        <td><asp:literal runat="server" ID="litStatus" /></td>
                        <td><asp:literal runat="server" ID="litDescription" /></td>
                        <td><asp:LinkButton runat="server" ID="lnkCancelJob" Text="[Cancel]" CommandName="cancel" /></td>
                    </tr>
                    
                        
                            <tr>
                            <asp:panel id="ShowHide" runat="server">
                                <td colspan="8">
                                
                                    <asp:Literal runat="server" ID="AppsList" />
                                    
                                </td>
                                </asp:panel>
                            </tr>
                        
                    
                         <cc1:CollapsiblePanelExtender runat="server" ID="CollapsiblePanelExtender1" 
                            TargetControlID="ShowHide" 
                            CollapsedSize="0"
                            Collapsed="True"
                            ExpandControlID="lnkExtend"
                            CollapseControlID="lnkExtend"
                            ImageControlID="lnkExtend"
                            SuppressPostBack="true"
                            SkinID="CollapsiblePanelDemo" autocollapse="false">
                        </cc1:CollapsiblePanelExtender>
                       
                </ItemTemplate>
                </asp:Repeater>
    NOTE: LitApplist gets changed to a div on itemdatabound

    Like this it works:


    <tr>
    <td colspan="8">
    <aspanel id="ShowHide" runat="server">
    <asp:Literal runat="server" ID="AppsList" />
    </aspanel
    </td>
    </tr>

    But I have to assign a height on itemdatabound to the div that is formed from the literal (which is no good because I dont know how many items)

    like this:

    <tr>
    <aspanel id="ShowHide" runat="server">
    <td colspan="8">
    <asp:Literal runat="server" ID="AppsList" />
    </td>
    </aspanel>
    </tr>

    It automatically expands to correct size but won't collapse.

    Help would be great.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: CollapsiblePanelExtender wont collapse

    Hello,

    Is it possible that you can upload a "working" sample (well obviously not a working sample, I mean a not working sample, but you know what I mean ), and we can take a look.

    Gary

  3. #3

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Re: CollapsiblePanelExtender wont collapse

    Thanks Gep but I figured it out, changed my html to

    <tr style="border:none;">
    <td colspan="7" style="padding:0;">
    <aspanel id="ShowHide" runat="server">
    <table>
    <tr><td>
    <asp:Literal runat="server" ID="AppsList" />
    </td></tr>
    </table>
    </aspanel>
    </td>
    </tr>

    and it worked

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] CollapsiblePanelExtender wont collapse

    Hey,

    Glad to hear that you got it working!!

    When you are posting code into the forum, can you please remember to surround it in [code][/code] or [HIGHLIGHT=vb][/highlight] tags? It makes it a lot easier to read, and you won't get those smilies in your post

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width