Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make a TreeView appear always fully expanded?

I have a TreeView on my form but I'd like it to always be fully expanded, even the child nodes.

Is there a way?


1 Answers

Do you want it to initially display expanded? If so, then call the ExpandAll method on the root node after you have added all of the tree nodes.

If you want it to display expanded and not allow the user to collapse it, then you need to handle the BeforeCollapsed event and cancel it. (Set e.Cancel = true;).

like image 88
Scott Dorman Avatar answered Sep 08 '25 17:09

Scott Dorman