Hi,
Thank you for your update.
Since TreeNodeAdv doesnot have any built in method or property to hide or show TreeNodeAdv, please find the below workaround that hides and shows the TreeNodeAdv by changing its Height and Text property:
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.treeViewAdv1.Nodes.Count; i++)
{
if (i % 2 == 0)
{
this.treeViewAdv1.Nodes[i].HelpText = this.treeViewAdv1.Nodes[i].Text;
this.treeViewAdv1.Nodes[i].Text = "";
this.treeViewAdv1.Nodes[i].Height = 0;
}
}
}
private void button2_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.treeViewAdv1.Nodes.Count; i++)
{
if (this.treeViewAdv1.Nodes[i].Height == 0)
{
this.treeViewAdv1.Nodes[i].Text = this.treeViewAdv1.Nodes[i].HelpText;
this.treeViewAdv1.Nodes[i].Height = 16;
}
}
}
Please refer to the below sample that illustrates this:
http://websamples.syncfusion.com/samples/Tools.Windows/F76371/main.htmPlease let me know if any concerns.
Regards,
Fathima