Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using the TreeListView (from ObjectListView of Philip Piper) and the checkbox, the problem i'm facing right now is that how can I show/enable the checkbox only for the childnote but not the parent node?
Posted
Updated 9-Jan-11 22:45pm
v3

HERE[^] is a little discussion regarding, you may find a way and As far as you haven't stated type of UI people can not suppose about.
 
Share this answer
 
You need to manually loop through the nodes and show/hide the ones you want. To hide all nodes except for the root, do this.

C#
foreach (TreeListNode aNode in YourTreeListView.Nodes)
 foreach (TreeListNode aNode2 in aNode.Nodes)
  aNode2.CheckBoxVisible = false;


Assuming there is only one level of children. To only show the Children do this.

C#
foreach (TreeListNode aNode in YourTreeListView.Nodes)
  aNode.CheckBoxVisible = false;


Thanks,
HH
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900