I am attempting to set up an instance where, if a parent node is checked then the children are checked and if the parent is unchecked the children should be unchecked.
I assume this is done on the client side.
Can I get some assistance with a script?
Hello Daryl,
Provide me with an isolated sample project and I will be happy to assist you finding what is causing the issue.
I am sorry, but it just doesn't work for me.
I have implemented the script as instructed. But the check box click event is not firing.
If doesn't change the child node check boxes.
I will play with it some more, but it just isn't working with my templated controls.
Hi,
I tested the sample with your markup and it works correctly. Just replace '#WebDataTree1' with '#wdtGeneral' in the script.
<ig:WebDataTree ID="wdtGeneral" runat="server" EnableConnectorLines="True" EnableExpandImages="False" Height="360px" SelectionType="Multiple" StyleSetName="Default" Width="90%" EnableTheming="False" CssClass="options"> <DragDropSettings EnableDropInsertion="False" EnableExpandOnDrop="False"> </DragDropSettings> <Nodes> <ig:DataTreeNode Draggable="False" Droppable="False" Editable="Off" TemplateId="chkCoEvaluate" Key="chkCoEvaluate" Value="chkCoEvaluate" CssClass="options" Expanded="True" > <Template> <asp:CheckBox ID="chkCoEvaluate" Text="The CO is evaluating" runat="server" CssClass="options" TabIndex="1" /> </Template> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkTeams" Key="chkTeams" Value="chkTeams" Expanded="True" > <Template> <asp:CheckBox ID="chkTeams" Text="Teams are used in this evaluation" runat="server" CssClass="options" TabIndex="2" /> </Template> <Nodes> <ig:DataTreeNode TemplateId="chkTeamLeaders" Key="chkTeamLeaders" Value="chkTeamLeaders" Expanded="True" > <Template> <asp:CheckBox ID="chkTeamLeaders" Text="Team leaders are evaluating" runat="server" CssClass="options" TabIndex="3" /> </Template> </ig:DataTreeNode> </Nodes> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkMessage" Key="chkMessage" Value="chkMessage" Expanded="True"> <Template> <asp:CheckBox ID="chkMessage" Text="Messaging is enabled" runat="server" CssClass="options" TabIndex="4" /> </Template> <Nodes> <ig:DataTreeNode TemplateId="chkTimerInterval" Key="chkTimerInterval" Value="chkTimerInterval" Expanded="True" > <Template> <table> <tr> <td valign="middle"> <asp:CheckBox ID="chkTimerInterval" Text="interval to check for new messages" runat="server" CssClass="options" TabIndex="5" /> <asp:RadioButtonList ID="optTimerInterval" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="options" TabIndex="6" EnableTheming="False"> <asp:ListItem Text="3" Value="3">3 Min </asp:ListItem> <asp:ListItem Value="5">5 Min </asp:ListItem> <asp:ListItem Value="10">10 Min </asp:ListItem> <asp:ListItem Value="15">15 Min </asp:ListItem> </asp:RadioButtonList> </td> </tr> </table> </Template> </ig:DataTreeNode> </Nodes> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkAdvisor" Key="chkAdvisor" Value="chkAdvisor" Expanded="True"> <Template> <asp:CheckBox ID="chkAdvisor" Text="Advisors are used in this evaluation" runat="server" CssClass="options" /> </Template> <Nodes> <ig:DataTreeNode TemplateId="chkAdvView" Key="chkAdvView" Value="chkAdvView" Expanded="True" > <Template> <asp:CheckBox ID="chkAdvView" Text="Advisors view other Advisors comments" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkAdvViewEval" Key="chkAdvViewEval" Value="chkAdvViewEval" Expanded="True"> <Template> <asp:CheckBox ID="chkAdvViewEval" Text="Add view Evaluator comments" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkAdvEval" Key="chkAdvEval" Value="chkAdvEval" Expanded="True" > <Template> <asp:CheckBox ID="chkAdvEval" Text="Advisor comments move to consensus" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkAdvRate" Key="chkAdvRate" Value="chkAdvRate" Expanded="True" > <Template> <asp:CheckBox ID="chkAdvRate" Text="Advisors assign a rating" runat="server" CssClass="options" /> </Template> <Nodes> <ig:DataTreeNode TemplateId="chkAdvRateShow" Key="chkAdvRateShow" Value="chkAdvRateShow" Expanded="True" > <Template> <asp:CheckBox ID="chkAdvRateShow" Text="Show Advisor ratings" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> </Nodes> </ig:DataTreeNode> </Nodes> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkCommentRef" Key="chkCommentRef" Value="chkCommentRef" Expanded="True" > <Template> <asp:CheckBox ID="chkCommentRef" Text="Evaluator comments must reference proposal" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> <ig:DataTreeNode TemplateId="chkRndCons" Key="chkRndCons" Value="chkRndCons" Expanded="True" > <Template> <asp:CheckBox ID="chkRndCons" Text="Show previous rounds comments in Consensus Module" runat="server" CssClass="options" /> </Template> </ig:DataTreeNode> </Nodes> </ig:WebDataTree>
This doesn't appear to work with check box templates