How to check if the parent node is check

2 posts, 0 answers
  1. Luc Émond
    Luc Émond avatar
    26 posts
    Member since:
    Jun 2010

    Posted 31 Mar 2011 Link to this post


    I am using a TreeView that is bind to databse.
    I am using CheckBoxes="true" TriStateCheckBoxes="true"  CheckChildNodes="true"

    Look somthing like this but checkbox ;

    Node 1 :
    • item 1
    • item 2
    • item 3

    Node 2:

    • item 11
    • item 22
    • item 33

    How can i find if the parent node is check?
    Here what i need to do!

    If the user click item 1 and item 3 and click submit
    He will recive a message that item 1 and item 3 is check
    For that part i have no probleme

    But if  he check item 1 , item 2 and item 3 "all the item"  then
    He will receive a message that  Node 1 is check

    Any idea how can do this?
    For the first part i am using something like this :

    Dim nodeCollection As IList(Of RadTreeNode) = RadTreeView1.CheckedNodes
            For Each node As RadTreeNode In nodeCollection

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Apr 2011 Link to this post


    I hope, you can do this from client side. When submitting the page, get the client side object of RadTreeView and alert (javascript alert to notify user) the user based on the checked nodes. You can iterate through the root nodes and check whether its checked or not, then continue with the child nodes.

    The following links will be helpfull in achieving the functionality.

  3. DevCraft R3 2016 release webinar banner
Back to Top