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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programatically Select All in TreeViewAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

18315 Aug 27,2004 01:36 PM UTC Aug 30,2004 03:55 PM UTC Windows Forms 3
loading
Tags: Tools
Matthew Brohn
Asked On August 27, 2004 01:36 PM UTC

How do you programatically select all the nodes in a TreeViewAdv? Do you really have to spin through the whole tree adding them to the treeViewAdv1.SelectedNodes, or is there a faster way? Cheers

Matthew Brohn
Replied On August 27, 2004 01:46 PM UTC

Actually.. treeViewAdv1.SelectedNodes.Clear(); treeViewAdv1.SelectedNodes.AddRange(treeViewAdv1.Nodes); this seems to work pretty well...

Matthew Brohn
Replied On August 30, 2004 02:26 PM UTC

Sigh.. Nevermind this only adds the top level nodes.. So back to square one.. is there a easy way to select all the nodes programatically? -M

Administrator [Syncfusion]
Replied On August 30, 2004 03:55 PM UTC

Hi, You could use the TreeViewAdv''s ExtendSelectionTo method for this purpose as shown in the code below : this.treeViewAdv1.SelectedNode = this.treeViewAdv1.TopVisibleNode; this.treeViewAdv1.ExtendSelectionTo(this.treeViewAdv1.LastVisibleNode); Please refer to the test sample attached here that shows how this can be done, and let me know if this meets your requirements. Thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;