Expandable TreeView Node in C#
In this article I’m going to
explain how to make expandable treeview node in C# when others node is closed.
Here I’m just creating a method to perform this task with name
take a look of this method code:
<asp:TreeView ID="TreeView1" runat="server" ExpandDepth="0"
TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
TreeNodeCollection ts = null;
if (e.Node.Parent == null)
ts = ((TreeView)sender).Nodes;
ts = e.Node.Parent.ChildNodes;
foreach (TreeNode node in ts)
if (node != e.Node)
Thanks for showing your interest in
Hi Haider M Rzvi,thank you for help me,my english not well ,I belive i can to do more better!
I very Thanks!