Learn how to a build a cloud-first strategyRegister Now

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

How do I make tree view child nodes appear upon form load?

Hi, how do I make the child nodes available for viewing upon loading of the form?  C# .NET 2005
child-nodes-shown.JPG
0
0nepiece
Asked:
0nepiece
  • 2
1 Solution
 
HainKurtSr. System AnalystCommented:
find the item "New" and set expanded to true
0
 
0nepieceAuthor Commented:
Thanks. I made use of the ExpandAll() function of the treeview. I tried to find the 'Expand' property of the node in the properties pane yet I wasn't able to. I was able to access it within the initialize component function. I don't understand why it is only accessible there.
0
 
HainKurtSr. System AnalystCommented:
http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.isexpanded.aspx

after finding the node, you can do this:

NodeNew.Expand();
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

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