title: Repeater inside a repeater with jQuery accordion
body: <p>I recently did a nested repeater according to this tutorial. The same thing</p>
  
  <p><a href="http://www.codeproject.com/Articles/6140/A-quick-guide-to-using-nested-repeaters-in-ASP-NET" rel="nofollow">http://www.codeproject.com/Articles/6140/A-quick-guide-to-using-nested-repeaters-in-ASP-NET</a></p>
  
  <p>But I added a jQuery accordion just like this example:</p>
  
  <p><a href="http://www.snyderplace.com/demos/accordion.html" rel="nofollow">http://www.snyderplace.com/demos/accordion.html</a></p>
  
  <p>Everything is good, but I realized some UI issues. I mean for example if one of my nested repeaters has 100 records and another has just 1 record, for this second with just 1 record, it has a blank space reserved as it had 100 records also. Someone knows how to fit the height each nested repeater to its elements?</p>
  
  <pre><code>&lt;div id="accordion"&gt;
      &lt;asp:Repeater ID="summary" runat="server" OnItemDataBound="summary_ItemDataBound"&gt;
          &lt;HeaderTemplate&gt;
          &lt;/HeaderTemplate&gt;
          &lt;ItemTemplate&gt;
              &lt;div&gt;
                  Id:&lt;asp:Literal ID="litCategory" runat="server" /&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;asp:Repeater ID="detail" runat="server" OnItemDataBound="detail_ItemDataBound"&gt;
                  &lt;HeaderTemplate&gt;
                      &lt;table&gt;
                          &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;ID&lt;/th&gt;
                                  &lt;th&gt;Name&lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                          &lt;tbody&gt;
                  &lt;/HeaderTemplate&gt;
                  &lt;ItemTemplate&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;asp:Literal ID="litID" runat="server" /&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;asp:Literal ID="litName" runat="server" /&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;FooterTemplate&gt;
                          &lt;/tbody&gt;
                      &lt;/table&gt;
                  &lt;/FooterTemplate&gt;
              &lt;/asp:Repeater&gt;
              &lt;/div&gt;
          &lt;/ItemTemplate&gt;
          &lt;FooterTemplate&gt;
          &lt;/FooterTemplate&gt;
      &lt;/asp:Repeater&gt;
  &lt;/div&gt;
  </code></pre>