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

Expand selected node and Scroll a treeview so the selected node is shown

Thread ID:





109740 Jul 2,2013 07:25 AM UTC Jul 29,2013 10:48 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Asked On July 2, 2013 07:25 AM UTC

I am setting the selected node of a large tree view. Now I want to have the tree scroll so the node is in view and set selected node is expanded. How can I accomplish this?

Gurunathan A [Syncfusion]
Replied On July 29, 2013 10:48 AM UTC

Hi Customer,

Thanks for contacting Syncfusion.

To view the selected node in TreeView when page loads, we suggest you to set the EnsureVisibleItem as true in Page_Load method and also set selected as true in which node you want to visible when page loads. The EnsureVisibleItem method is used to ensure that the selected item is visible. After the page is loaded, TreeView root html control will be scrolled automatically and selected item would be visible. Please refer the following code snippet.



protected void Page_Load(object sender, EventArgs e)





<syncfusion:TreeView ID="TreeView" runat="server" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Height="80px" Width="160px">


<syncfusion:TreeViewNode Expanded="true" Text="Node1" Selected="true" >

                <syncfusion:TreeViewNode Text="Child Node1">






If you want to know more details about Tree View. Please refer the following link.


We have also prepared a simple sample to exhibit the behavior. Please follow the  below link.


Please let us know if you have further queries.

Warm Regards,

Gurunathan A


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