We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeNodeAdv, selecting miltiple nodes programatically

Hi, Does anyone know if it is possible to select multible nodes in a TreeViewAdv contoll programatically? /Peter

2 Replies

SG Sean Greer September 14, 2004 06:19 PM UTC

See this forum thread: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=18522

AD Administrator Syncfusion Team September 15, 2004 01:54 PM UTC

Hi, Sean, Thanks for the update. We appreciate your continued support for Syncfusion. Peter, You would have to derive from the TreeViewAdv and use the protected SetSelectedNode method for this purpose as shown in the code below : public class CustomTreeViewAdv : TreeViewAdv { public CustomTreeViewAdv () : base() {} public void AddSelectedNode(TreeNodeAdv node) { ArrayList arr = new ArrayList(); arr.Add(node); this.SetSelectedNode (arr, null, TreeViewAdvAction.Unknown, false, true); } } // Invoke the AddSelectedNode method to add nodes to the SelectedNodes collection this.treeViewAdv1.AddSelectedNode(node); Please refer to the sample attached that illustrates this. Let me know if this helps. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Live Chat Icon For mobile
Up arrow icon