Nested ListView lazy-loaded

Discussion in 'ASP .Net' started by Kodiak, May 2, 2009.

  1. Kodiak

    Kodiak Guest

    I have a nested listview that I want to lazy-load using the
    ImageButton Click event. Once the ImageButton is clicked I want to
    find the nested listview and databind to it. I know I can use the
    ItemDataBound event of the parent listview, but I need to use the
    ImageButton to load the nested listview. I am not sure how to do it
    and any help is appreciated!

    <asp:listview id="datesListView" runat="server"
    onpagepropertieschanging="obitPropertiesChanging">
    <layouttemplate>
    <asp:placeholder id="itemPlaceholder" runat="server" /
    >

    </layouttemplate>
    <itemtemplate>
    <h2>Obituaries for <%#Eval ("obitDate") %></h2>
    <asp:IimageButton ID="imgButton" runat="server"
    OnClick="imgButton_Click" Text="Load Child ListView"/>
    <asp:listview id="obituariesListView" runat="server">
    <layouttemplate>
    <dl id="obituaries">
    <asp:placeholder id="itemPlaceholder"
    runat="server" />
    </dl>
    </layouttemplate>
    <itemtemplate>
    <dt><%#Eval("nameOfDeceased") %></dt>
    <dd><%#Eval("age") %></dd>
    <dd><%#Eval("cityOfResidence") %></dd>
    </itemtemplate>
    <alternatingitemtemplate>
    <dt><%#Eval("nameOfDeceased") %></dt>
    <dd><%#Eval("age") %></dd>
    <dd><%#Eval("cityOfResidence") %></dd>
    </alternatingitemtemplate>
    <emptydatatemplate>
    <p>There are no obituaries for today.</p>
    </emptydatatemplate>
    </asp:listview>
    </itemtemplate>
    </asp:listview>
     
    Kodiak, May 2, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ole V.-M.
    Replies:
    2
    Views:
    381
    Ole V.-M.
    Mar 16, 2007
  2. Ken Pu
    Replies:
    3
    Views:
    679
    Steven D'Aprano
    Jan 16, 2009
  3. Boris Borcic
    Replies:
    0
    Views:
    559
    Boris Borcic
    Jan 16, 2009
  4. Boris Borcic
    Replies:
    0
    Views:
    551
    Boris Borcic
    Jan 16, 2009
  5. .
    Replies:
    0
    Views:
    745
Loading...

Share This Page