This is a migrated thread and some comments may be shown as answers.

How to check if the parent node is check

1 Answer 117 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Luc Émond
Top achievements
Rank 1
Luc Émond asked on 31 Mar 2011, 05:51 PM
Hi,

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
              MsgBox()
           Next



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Apr 2011, 08:27 AM
Hello,


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.
RadTreeView
RadTreeNode


Regards,
Princy.
Tags
TreeView
Asked by
Luc Émond
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or