mugsey
asked on
nested listview how to iterate through child listview control
I have nested listview (see below)
How can I iterate through child listview ?
I am using
ListView ChildListView = (ListView)parentListView.F indControl ("childLis tView"); //THIS IS ALWAYS NULL!
foreach (ListViewDataItem item in ChildListView.Items)
{
}
I cannot get a reference to the child listview - how can I solve this?
How can I iterate through child listview ?
I am using
ListView ChildListView = (ListView)parentListView.F
foreach (ListViewDataItem item in ChildListView.Items)
{
}
I cannot get a reference to the child listview - how can I solve this?
<asp:ListView ID="parentListView" runat="server"
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"> </asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<!-- title goes here -->
<asp:ListView ID="childListView" runat="server"
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" .....
</LayoutTemplate>
<ItemTemplate>
</ItemTemplate>
ASKER
I am not using any of the listview events - you see I am inserting a new entity into the database
So I have an addbutton event
Then I want to iterate through the child listview
So I have an addbutton event
Then I want to iterate through the child listview
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ListView ChildListView = (ListView)parentListView.F