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>
<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>
<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?');" />
</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