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.

Scrolling in tree

Thread ID:

Created:

Updated:

Platform:

Replies:

43253 Apr 19,2006 08:01 AM May 3,2006 07:51 AM Windows Forms 2
loading
Tags: Tools
Administrator [Syncfusion]
Asked On April 19, 2006 08:01 AM

Hi I am using treeviewadv and version 3.3. Is there any possibility to change the selection programatically from the top to bottom node of the tree. So that tree scrolls to show the bottom node. Regards, Lance

Deepa TS [Syncfusion]
Replied On April 19, 2006 10:18 AM

Hi Lance, You could scroll the TreeViewAdv from top to bottom by setting the last node as the SelectedNode of the tree and EnsureVisibleSelectedNode property to true. This will bring the invisible node into visible state by scrolling to the SelectedNode. And also if you select the node programmatically in button click event or any other control, TreeViewAdv will lose the focus and the selection will be hidden. So that you may need to set the HideSelection property to false for displaying the selection of the node even it lose the focus. Code: //select first node private void button1_Click(object sender, System.EventArgs e) { this.treeViewAdv1.SelectedNode=this.treeViewAdv1.Nodes[0]; //this.treeViewAdv1.Focus(); } //select last node private void button2_Click(object sender, System.EventArgs e) { this.treeViewAdv1.SelectedNode = this.treeViewAdv1.Nodes[this.treeViewAdv1.Nodes.Count-1]; //this.treeViewAdv1.Focus(); } Please take a look at the attached sample which illustrates the above functionality and let me know if this helps you. TopToBottom Thanks for your interest in Syncfusion products. Regards, Deepa

Administrator [Syncfusion]
Replied On May 3, 2006 07:51 AM

Thanks for the information about HideSelection property

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.

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.

;