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

x
?
Solved

C# TreeView that shows CheckBoxes ONLY in chosen Nodes

Posted on 2004-09-09
11
Medium Priority
?
2,870 Views
Last Modified: 2008-02-01
Hello,

Could you please help me to create a TreeView (C#). The TreeView must have CheckBoxes only in some Nodes (parent or children does not matter) chosen at run-time. I do not want my TreeView to have a CheckBoxes in any Node, as it is in .Net Framework now.

Thank you.
0
Comment
Question by:AJBykov
  • 4
  • 4
11 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12020524
there is a property of the node which says whether or not there is a checkbox.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12020526
i am not quite sure what else you are asking for.
0
 

Author Comment

by:AJBykov
ID: 12021562
Every TreeNode has Checked property. When I set TreeView -> CheckBoxes property every Node in TreeView gets a CheckBox. I do not need a CheckBox near every Node. I would like to decide in run-time which node has a CheckBox and which does not. Looks like I have to create my own TreeView...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 37

Accepted Solution

by:
gregoryyoung earned 1500 total points
ID: 12021629
you would need to override the painting of the treeview (not trivial) or deal directly with the API ...

if you want to do this I can give you some examples ...
0
 

Author Comment

by:AJBykov
ID: 12022208
Yes, please. I will override the painting of the TreeView. If you could provide me a sample I would greatly appreciate that.
0
 

Expert Comment

by:shilpa2784
ID: 12024074
Do you want to get the checkbox for a specific node at the runtime?? If yes i dont think it is possible with the existing treeview control ....u have to override and create your own treeview control
0
 

Author Comment

by:AJBykov
ID: 12026596
Yes, I am doing that right now. Could you tell me that the button "Accept" (near a comment) means?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12027265
it means to accept that comment as your answer ... I started working on this last night but its not only a few lines of code, I will try to get back to it this evening.
0
 

Author Comment

by:AJBykov
ID: 12027319
Thank you!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

916 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