Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 618
  • Last Modified:

How to make checkboxes invisible for the Treeview Root node

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
Murugesh Perumal
Asked:
Murugesh Perumal
  • 2
1 Solution
 
Audhi203Commented:
Access till the nodes/levels you want to make checkboxes invisibile and set <ctrl>.Visible = false based on your if-else conditions
0
 
Dale FyeCommented:
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
 
Murugesh PerumalAuthor Commented:
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
 
Dale FyeCommented:
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

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now