I have noticed a problem with the CollapsiblePanelExtender. I have a CollapsiblePanelExtender on a page that won't display it's contents even though the panel is expanded. The panel contains an update panel. The code looks something like this:
<cc1:CollapsiblePanelExtender ID="cpePaymentInfo" runat="server"
TargetControlID="pnlPayments" Collapsed="False"
CollapseControlID="pnlPaymentsTitle"
ExpandControlID="pnlPaymentsTitle"
CollapsedImage="~/images/collapse.jpg"
ExpandedImage="~/images/expand.jpg" ImageControlID="imgPaymentExpand"
Enabled="True" />
<asp:Panel ID="pnlPaymentsTitle" runat="server" style="color: White; background-color: #A08F63; padding:5px" Height="15px">
<div style="float: left">
<b>Payment Information</b>
</div>
<div style="float: right; vertical-align:middle">
<asp:Image ID="imgPaymentExpand" runat="server" ImageUrl="~/images/expand.jpg" />
</div>
</asp:Panel>
<asp:Panel ID="pnlPayments" runat="server">
<br />
<asp:UpdatePanel ID="upPayments" runat="server">
<ContentTemplate>
I've used Firebug to see what is happening and there is a div tag that is getting rendered out with an incorrect height. So the panel is only partially extended and not all of the content displays. This is happening with the latest version of the AjaxControlToolkit.
I have found a workaround for this issue. If I use something like this then the panel is fully expanded on page load:
<cc1:CollapsiblePanelExtender ID="cpePaymentInfo" runat="server"
TargetControlID="pnlPayments" Collapsed="False"
CollapseControlID="pnlPaymentsTitle"
ExpandControlID="pnlPaymentsTitle"
CollapsedImage="~/images/collapse.jpg"
ExpandedImage="~/images/expand.jpg" ImageControlID="imgPaymentExpand"
Enabled="True" />
<asp:Panel ID="pnlPaymentsTitle" runat="server" style="color: White; background-color: #A08F63; padding:5px" Height="15px">
<div style="float: left">
<b>Payment Information</b>
</div>
<div style="float: right; vertical-align:middle">
<asp:Image ID="imgPaymentExpand" runat="server" ImageUrl="~/images/expand.jpg" />
</div>
</asp:Panel>
<asp:Panel ID="pnlPayments" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<br />
<asp:UpdatePanel ID="upPayments" runat="server">
<ContentTemplate>
I don't think I should have to wrap my content in a table just for the height to be set properly. If I collapse and reexpand the panel using the code in the first example the panel is rendered to the correct height. I shouldn't have to collapse the panel and then uncollapse it just to see my content. This seems like a bug and I'm hoping someone can take a look.
Comments: I am also facing same problem. i am not using any update panel but Panel is only partially expanded and not all of the content displays. I've used Firebug to see what is happening and there is a div tag that is getting rendered out with an incorrect height. Please someone look into this. Thanks,
<cc1:CollapsiblePanelExtender ID="cpePaymentInfo" runat="server"
TargetControlID="pnlPayments" Collapsed="False"
CollapseControlID="pnlPaymentsTitle"
ExpandControlID="pnlPaymentsTitle"
CollapsedImage="~/images/collapse.jpg"
ExpandedImage="~/images/expand.jpg" ImageControlID="imgPaymentExpand"
Enabled="True" />
<asp:Panel ID="pnlPaymentsTitle" runat="server" style="color: White; background-color: #A08F63; padding:5px" Height="15px">
<div style="float: left">
<b>Payment Information</b>
</div>
<div style="float: right; vertical-align:middle">
<asp:Image ID="imgPaymentExpand" runat="server" ImageUrl="~/images/expand.jpg" />
</div>
</asp:Panel>
<asp:Panel ID="pnlPayments" runat="server">
<br />
<asp:UpdatePanel ID="upPayments" runat="server">
<ContentTemplate>
I've used Firebug to see what is happening and there is a div tag that is getting rendered out with an incorrect height. So the panel is only partially extended and not all of the content displays. This is happening with the latest version of the AjaxControlToolkit.
I have found a workaround for this issue. If I use something like this then the panel is fully expanded on page load:
<cc1:CollapsiblePanelExtender ID="cpePaymentInfo" runat="server"
TargetControlID="pnlPayments" Collapsed="False"
CollapseControlID="pnlPaymentsTitle"
ExpandControlID="pnlPaymentsTitle"
CollapsedImage="~/images/collapse.jpg"
ExpandedImage="~/images/expand.jpg" ImageControlID="imgPaymentExpand"
Enabled="True" />
<asp:Panel ID="pnlPaymentsTitle" runat="server" style="color: White; background-color: #A08F63; padding:5px" Height="15px">
<div style="float: left">
<b>Payment Information</b>
</div>
<div style="float: right; vertical-align:middle">
<asp:Image ID="imgPaymentExpand" runat="server" ImageUrl="~/images/expand.jpg" />
</div>
</asp:Panel>
<asp:Panel ID="pnlPayments" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<br />
<asp:UpdatePanel ID="upPayments" runat="server">
<ContentTemplate>
I don't think I should have to wrap my content in a table just for the height to be set properly. If I collapse and reexpand the panel using the code in the first example the panel is rendered to the correct height. I shouldn't have to collapse the panel and then uncollapse it just to see my content. This seems like a bug and I'm hoping someone can take a look.
Comments: I am also facing same problem. i am not using any update panel but Panel is only partially expanded and not all of the content displays. I've used Firebug to see what is happening and there is a div tag that is getting rendered out with an incorrect height. Please someone look into this. Thanks,