Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

'grey' or undetermining a checkbox in a treeview

Posted on 2006-11-28
2
Medium Priority
?
637 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
snow_moon earned 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 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