Solved

'grey' or undetermining a checkbox in a treeview

Posted on 2006-11-28
2
605 Views
Last Modified: 2012-06-27
G'day experts. I was hoping one of you genius' would know:

I have a treeview with several parent nodes, each containing some child nodes.
I need to be able to select a parent node and have all child nodes follow the checkstate, but if I check a child node, the parent checkbox needs to grey, or become indeterminate UNLESS, all child nodes are selected, in which the parent becomes fully checked OR if all children become unchecked, then the parent becomes unchecked.

I've seen it done in other applications, for example whilst installing Visual Studio it asks what options you want to install and the treeview behaves like this. Anyway, I'm hoping that it's easy enough to do in VB.net as well as whatever compiler those programmes were using.

Thanks for any help. Cheers!
0
Comment
Question by:Phantom_skulcave
2 Comments
 
LVL 3

Accepted Solution

by:
snow_moon earned 250 total points
ID: 18034568
Have a look at
http://www.codeproject.com/cs/miscctrl/TriStateTreeViewSubmissio.asp

It's coded in C#, you might want to convert it to VB though.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now