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

Set Checkable to False on Parent Node

1 Answer 40 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 15 Oct 2009, 01:17 PM
Hello,

Is it possible to set the parent node checkable property to false if there are child nodes while the child nodes remain checkable.  In other words if a parent has children, the parent is not checkable; otherwise the parent is checkable if it has no children.  I have tried to do this under page_prerender after the radtree is databound but with no luck on the syntax.  Any help would be greatly appreciated.  We are working in .net using vb.

Thanks

1 Answer, 1 is accepted

Sort by
0
Jason
Top achievements
Rank 1
answered on 15 Oct 2009, 01:23 PM
Nevermind....I have figured out the syntax. 

For i = 0 To Test_RadTree.Nodes.Count - 1
            If Test_RadTree.Nodes(i).Nodes.Count > 0 Then
                Test_RadTree.Nodes(i).Checkable = False
            End If
Next
Tags
TreeView
Asked by
Jason
Top achievements
Rank 1
Answers by
Jason
Top achievements
Rank 1
Share this question
or