Hide and Show nested repeater

lenguyen0366
lenguyen0366 used Ask the Experts™
on
Hi,

   Any body has examples, or know any links that discuss about nested repeater that can hiden and shown at the click of an event for example a linkbutton on parent repeater?  I am looking for examples especially in VB.NET.  I have searched for quite some time but have not found one that includes all what I am looking for: the expandable feature and in VB.NET.

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try this:

<% int Counter = 0; %>
<asp:Repeater ID="BaseRepeater" runat="server">
  <ItemTemplate>
    <% Counter = Counter + 1; %>
    <a href='javascript:openclose(<%= Counter %>);'>Open/Close</a>
    <div id='Panel_<%= Counter %>'>
      <asp:Repeater ID="NestedRepeater" runat="server" DataSource='<%# Nested Data Source %>'>
        <ItemTemplate>X</ItemTemplate>
      </asp:Repeater>
    </div>
  </ItemTemplate>
</asp:Repeater>
<script>
var counter= 0;
function openclose(i)
{
  var panel= document.getElementById('Panel_'+ i);
  panel.style.display= (panel.style.display== 'none'? 'block': 'none');
}
</script>

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial