2
votes

I am using a treeview control in C# .net 3.5. When i expand the root node the children of the root node are also getting expanded. What i want is when i expand the root node on the children of root node to be show without they being expanded.

1
can you share some of your expansion code ? Would help us know if you're doing winforms or wpf and what you are doing. - Gishu
The problem is solved.I am adding nodes dynamically when a node is expanded. I used Tree Node.Expanded = False; whenever i add a new node. - radhika

1 Answers

0
votes

If you are adding child nodes dynamically when any given node is expanded, you just need to set the node.Expanded property to false for each child node that you add.

That should solve your problem.