Solved

'grey' or undetermining a checkbox in a treeview

Posted on 2006-11-28
2
601 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

18 Experts available now in Live!

Get 1:1 Help Now