Hi
i have a UI that has a (child) listview nested inside another (parent) listview. based on a particular value (say a count), parent listview populates the child listview and renders 3 rows each for all the counts.
the child listview has a checkbox inside its item template, and i use a MutuallyExclusiveCheckBoxExtender to enable user to select just one check box out of the 3 rows rendered for it.
on running the code the first two checkboxes are made mutuallyexclusive, while the others remain as they are
is there a known problem with MutuallyExclusiveCheckBoxExtender with nested listview controls?
could some one please tell me the workaround ?
my code is
<asp:UpdatePanel ID="UPDropDownArea" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:ListView ID="ListView1" runat="server"
onitemdatabound="ListView1_ItemDataBound" ItemPlaceholderID="id1"
onitemcommand="ListView1_ItemCommand">
<LayoutTemplate>
<asp:PlaceHolder ID="id1" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<table>
<tr>
<td>
Drop Down Area:
<asp:Label ID="LblDropDownAreaNumber" runat="server" Text='<%#Eval("DDAreaId")%>'></asp:Label>
<asp:LinkButton ID="LkbUpdate" runat="server" Text="Save All" CommandName="SaveAll" CommandArgument='<%#Eval("DDAreaId")%>'></asp:LinkButton>
<asp:Label ID="LblSave" runat="server" Text="Unsaved"></asp:Label>
<br />
<asp:Label ID="LblTest" runat="server" Text="Correct Answer!!"></asp:Label>
<asp:LinkButton ID="LkbAdd" runat="server" Text="Add answer" CommandName="AddAnswer" CommandArgument='<%#Eval("DDAreaId")%>' ></asp:LinkButton>
</td>
</tr>
<tr>
<td>
<asp:ListView ID="ListView3" runat="server" ItemPlaceholderID="id2">
<LayoutTemplate>
<asp:PlaceHolder ID="id2" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<table border="1px">
<tr>
<td>
<asp:Panel ID="PanelDropDownAreaAnswer" runat="server">
<asp:Label ID="Label2" runat="server" Text='<%#Eval("AnswerId")%>'></asp:Label>
<asp:CheckBox ID="ChkBoxAns" runat="server" />
<asp:MutuallyExclusiveCheckBoxExtender ID="MutuallyExclusiveCheckBoxExtender1" runat="server" Key="MyKey" TargetControlID="ChkBoxAns">
</asp:MutuallyExclusiveCheckBoxExtender>
<asp:TextBox ID ="TxtAns" runat="server" Text='<%#Eval("AnswerText")%>'></asp:TextBox>
<asp:Button ID= "BtnDelete" runat="server" Text="Delete" CommandName="Delete" CommandArgument='<%#Eval("AnswerId", "ParentId")%>'/>
</asp:Panel>
</td>
</tr>
</table>
</ItemTemplate>
</asp:ListView>
</td>
</tr>
</table>
</ItemTemplate>
</asp:ListView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DdlAreas" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>