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

x
?
Solved

How to make checkboxes invisible for the Treeview Root node

Posted on 2010-08-15
4
Medium Priority
?
615 Views
Last Modified: 2013-11-29
I have a form with a tree view control in it. It has 4 levels. I would like to have the checkboxes visible only for the 3rd and 4th level.
How to make the checkboxes invisible for the Root node and the 1st level?

FYI: To make the checkboxes visible, I just set the Tree view checkboxes property to TRUE.
0
Comment
Question by:Murugesh Perumal
[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
4 Comments
 
LVL 4

Expert Comment

by:Audhi203
ID: 33443565
Access till the nodes/levels you want to make checkboxes invisibile and set <ctrl>.Visible = false based on your if-else conditions
0
 
LVL 48

Accepted Solution

by:
Dale Fye earned 250 total points
ID: 33553487
I'm not sure that there is a way to do this.  I've been using the treeview for quite a while and I believe that the checkbox property applies to the entire tree.  I cannot recall ever seeing a tree that has checkboxes at one level and not another.

However, you could use the treeview controls Check event to determine the level that was checked (I usually store that value in the nodes Tag property as I build the tree).  If the level was 1 or 2, you could display a message advising the user that checking those levels has no effect.  Then set the nodes Checked Property to false.
0
 

Author Closing Comment

by:Murugesh Perumal
ID: 33733080
I agree that there is no straight away method to make the checkboxes invisible only for certain levels.

Checking the checkboxes - validations can be done
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 33733855
A "C",  what about the answer deserved a "C"?


Was it inaccurate? incomplete?

The fact that you cannot do what you wanted to do is no reason for a "C".
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

730 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