Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8776409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:02:55+00:00 2026-06-13T19:02:55+00:00

I have a treeview with several nodes and their child nodes under root node.

  • 0

I have a treeview with several nodes and their child nodes under root node. I am having checkbox enabled for each node. What i need is when user checks on parent node all the child nodes under that node should be checked on (similar for uncheck).
I want to achieve this using JQuery.

Any help is greatly appreciated.

Thanks for sharing your time and wisdom.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:02:57+00:00Added an answer on June 13, 2026 at 7:02 pm

    You could try the following, taken from the asteranup’s answer:

    <form id="form1" runat="server">
        <asp:TreeView ID="LinksTreeView" Font-Name="Arial" ForeColor="Blue" InitialExpandDepth="2"
            ShowCheckBoxes="Parent,Leaf" runat="server">
            <LevelStyles>
                <asp:TreeNodeStyle ChildNodesPadding="10" Font-Bold="true" Font-Size="12pt" ForeColor="DarkGreen" />
                <asp:TreeNodeStyle ChildNodesPadding="5" Font-Bold="true" Font-Size="10pt" />
                <asp:TreeNodeStyle ChildNodesPadding="5" Font-Underline="true" Font-Size="10pt" />
                <asp:TreeNodeStyle ChildNodesPadding="10" Font-Size="8pt" />
            </LevelStyles>
            <Nodes>
                <asp:TreeNode Text="Table of Contents" SelectAction="None">
                    <asp:TreeNode Text="Chapter One">
                        <asp:TreeNode Text="Section 1.0">
                            <asp:TreeNode Text="Topic 1.0.1" />
                            <asp:TreeNode Text="Topic 1.0.2" />
                            <asp:TreeNode Text="Topic 1.0.3" />
                        </asp:TreeNode>
                        <asp:TreeNode Text="Section 1.1">
                            <asp:TreeNode Text="Topic 1.1.1" />
                            <asp:TreeNode Text="Topic 1.1.2" />
                            <asp:TreeNode Text="Topic 1.1.3" />
                            <asp:TreeNode Text="Topic 1.1.4" />
                        </asp:TreeNode>
                    </asp:TreeNode>
                    <asp:TreeNode Text="Chapter Two">
                        <asp:TreeNode Text="Section 2.0">
                            <asp:TreeNode Text="Topic 2.0.1" />
                            <asp:TreeNode Text="Topic 2.0.2" />
                        </asp:TreeNode>
                    </asp:TreeNode>
                </asp:TreeNode>
                <asp:TreeNode Text="Appendix A" />
                <asp:TreeNode Text="Appendix B" />
                <asp:TreeNode Text="Appendix C" />
            </Nodes>
        </asp:TreeView>
      </form>
    

    Javascript:

    $(document).ready(function() {
        ("div[id $= LinksTreeView] input[type=checkbox]").click(function() {           
            $(this).closest("table").next("div").find("input[type=checkbox]").attr("checked", this.checked);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Treeview control with each item having a checkbox. At root level
I have treeview control with one level of parent and child nodes, each node
I am creating a TreeView at runtime. It has several nodes(TreeViewItem), each one having
I have a WinForms TreeView with one main node and several sub-nodes. How can
I have a TabControl and under it I have several elements like TreeView and
I have a treeview in which a user can move, delete subtrees, nodes and
I have a TreeView with binded ItemsSource. I want to select my root(first) node.
I have TreeView object and I need when a node of treeview is selected,
I have a treeview which contains, per node, a key and text. However, there
I have a TreeView that launches a new window when each of its TreeViewItems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.