Nested ListView lazy-loaded

K

Kodiak

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>
<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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top