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"> </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">
<asp
anel id="ShowHide" runat="server">
<asp:Literal runat="server" ID="AppsList" />
</asp
anel
</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>
<asp
anel id="ShowHide" runat="server">
<td colspan="8">
<asp:Literal runat="server" ID="AppsList" />
</td>
</asp
anel>
</tr>
It automatically expands to correct size but won't collapse.
Help would be great.