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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scrolling in tree

Thread ID:





43253 Apr 19,2006 12:01 PM UTC May 3,2006 11:51 AM UTC WinForms 2
Tags: Tools
Administrator [Syncfusion]
Asked On April 19, 2006 12:01 PM UTC

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 02:18 PM UTC

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 11:51 AM UTC

Thanks for the information about HideSelection property


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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