CollapsiblePanel used to work in Atlas but won't display in AJAX

Last post 05-01-2007 12:31 PM by PBecker. 1 replies.

Sort Posts:

  • CollapsiblePanel used to work in Atlas but won't display in AJAX

    04-30-2007, 2:54 PM
    • Member
      5 point Member
    • PBecker
    • Member since 09-28-2006, 11:48 AM
    • Texas
    • Posts 3

    Hi there -

    I'm using Visual Studio SP1 2005 with IE 6.  I installed AJAX Release 10301 since I was having some error messages in the eventlog that was related to the CollapsiblePanel.  From what I read, it appeared that I may be experiencing the memory leak that had been identified.  So with the new  AJAX installed I migrated the application and am now having trouble with the collapsiblepanel in that it is not "visible".  I have a page that has about 4 panels that default to collapsed.  When one is opened, modifying the data (e.g. a grid) goes to another page and comes back to this original page.  In the load of the page, I determine if any of the panels need to be open.  With Atlas, I programmatically set collapsed to false and it worked great. 

     cpePhone.TargetProperties[0].Collapsed = false;

     With AJAX

      cpePhone.Collapsed = false;

    does not work.  I also added cpePhone.ClientState="false" but it is not visible.  I know it's there since when I close the panel it displays and then collapses.

    Below is the code:

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="actk" %>
       <asp:ScriptManager id="ScriptManager" EnablePartialRendering="true" runat="Server"  ></asp:ScriptManager>
    <asp:Panel runat="server" ID="pPhoneCollapsed" Font-Names="Verdana" Font-Size="10pt" style="margin-left:14pt">
    <div style="font-family:Verdana; font-size:10pt;" >
    <asp:Image runat="server" ID="imgPhone" ImageUrl="~/App_Themes/Basic/plus.bmp" />
    <asp:Label ID="lblPhone" runat="server" SkinID="lblForm" Text="Phone Number(s)" ></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:ImageButton ID="btnAddPhone" runat="server" CommandName="gvAddPhone" ToolTip="Add Phone"
    ImageUrl="~/App_Themes/Basic/add.gif" OnClick="btnAddPhone_Click" CausesValidation="true" />
    </div>
    </asp:Panel> <asp:Panel runat="server" ID="pPhoneShow" Height="0" style="margin-left:14pt" >
    <asp:GridView ID="gvPhone" runat="server" SkinID="gvGrayHeader"
    DataKeyNames="phone_id"
    OnRowCreated="gvPhone_RowCreated"
    OnRowCommand ="gvPhone_RowCommand"
    AutoGenerateColumns="false" >
    <Columns>
    <asp:HyperLinkField DataNavigateUrlFields="phone_id,phone_scope,org_id,contact_id,phone_type" DataNavigateUrlFormatString="~/Phone.aspx?PID={0}&PS={1}&OID={2}&CID={3}&PT={4}"
    DataTextField="description" NavigateUrl="~/Phone.aspx" HeaderStyle-HorizontalAlign="Left" HeaderText="Type" ControlStyle-Width="100" >
    </asp:HyperLinkField>
    <asp:TemplateField HeaderText="Number" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" >
    <ItemTemplate>
    <%# Eval("phone_number") %>
    </ItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField>
    <ItemTemplate>
    &nbsp;&nbsp;
    <asp:ImageButton ID="btnDelete" runat="Server" CommandName="gvDelete" CausesValidation="false"
    ImageUrl="~/App_Themes/Basic/Delete_can.gif" ToolTip="Delete"
    OnClientClick="return confirm('Do you want to Delete?');" />
    &nbsp;
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    </asp:Panel>
     <actk:CollapsiblePanelExtender ID="cpePhone" runat="server" 
    TargetControlID="pPhoneShow" CollapseControlID="pPhoneCollapsed"
    ExpandControlID="pPhoneCollapsed" Collapsed="true" TextLabelID="lblPhoneCollapsed"
    ExpandedText="Phone Number(s)" CollapsedText="Phone Number(s)"
    ImageControlID="imgPhone" ExpandedImage="App_Themes/Basic/minus.bmp" CollapsedImage="App_Themes/Basic/plus.bmp"
    SuppressPostBack="false" />

    The .cs file the Load calls the method to keep the panel open:

    cpePhone.Collapsed = false;

    cpePhone.ClientState = "false";  

     

    Any ideas for how to get the panel to display instead of looking like it's open but it's not visible?

     

    Thanks for your help.

     
    Piper
     

     

  • Re: CollapsiblePanel used to work in Atlas but won't display in AJAX

    05-01-2007, 12:31 PM
    • Member
      5 point Member
    • PBecker
    • Member since 09-28-2006, 11:48 AM
    • Texas
    • Posts 3

    Ok, sorry for the post in the first place.  I finally figured it out.  As I have read on this subject, one of the suggestions is to add style="overflow:hidden".  After adding it to the panel tag, it did the trick.  I didn't need the ClientState property just adding that portion to the panel tag.

    Thanks for those of you that were viewing the post and possibly offering ideas.

     

    Piper
     

Page 1 of 1 (2 items)