Single node in a TreeView without a checkbox

Hi Experts

I have a TreeView control with two main nodes (Parent1 and Parent2), each of which has children, they have children, etc. I have enabled the checkboxes for the TreeView and everything is fine. The only little problem is, that the Parent1 and Parent2 nodes are actually just grouping and the logic is that they cannot be selected. Is it possible that only those two nodes have NO checkboxes, whilst all others have?

Thanks
TheAvenger
LVL 20
TheAvengerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
armoghanConnect With a Mentor Commented:
this might be helpful
http://www.codeproject.com/cs/miscctrl/TreeViewRadioBox.asp

You may be able to add a node which is a treenode
TreeNodepollNode =
     new TreeNode("Survey");
0
 
smeggheadCommented:
I've done this in the past, but it's not a very tidy solution.. and I'm sure you've thought of this already.

What you can do is not have checkboxes, but apply an image to each treenode, one of those images would be a square with a cross in it, the other just a square, and the other nothing.. Then, when you click an item, toggle it's checked property and change to the relevant image.
0
 
TheAvengerAuthor Commented:
Hmm, does not seem like the perfect solution. Still 10x for the suggestion.

Have you come accross any custom TreeView control, that is reacher than the one from MS?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Razzie_Connect With a Mentor Commented:
TheAvenger,

Might want to take a look at http://www.codeproject.com/cs/miscctrl/treelistview.asp?df=100&forumid=13572&exp=0&select=756432

It is a custom TreeView control, from which I know it for example supports custom checkboxes, and I believe you can disable checking a checkbox... so I hope it comes close to what you want.

HTH,

Razzie
0
 
Razzie_Commented:
And maybe it will help with your other question too :)
0
 
TheAvengerAuthor Commented:
Thank you very much guys!
0
All Courses

From novice to tech pro — start learning today.