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