Articles in this section
Category / Section

What is the use of the ShowPlusOnExpand property of the TreeNodeAdv in WinForms TreeViewAdv?

1 min read

Use of ShowPlusOnExpand

1.To keep displaying the Plus sign on a node even when expanded while in LoadOnDemand mode.

2.The BeforeExpand event would get raised even when the plus is clicked again when in expanded mode so that you can check the datasource for changes and this will be useful only with LoadOnDemand property is set to true. Otherwise it will not affect anything.

C#

private void button1_Click(object sender, System.EventArgs e)
{
   TreeNodeAdv node=this.treeViewAdv1.Nodes[2];
   node.ShowPlusOnExpand=true;
   this.treeViewAdv1.SelectedNode=this.treeViewAdv1.Nodes[2];
}

VB

Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
   Dim node As TreeNodeAdv=Me.treeViewAdv1.Nodes(2)
   node.ShowPlusOnExpand=True
   Me.treeViewAdv1.SelectedNode=Me.treeViewAdv1.Nodes(2)
End Sub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied