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

Scroll a treeview so the selected node is shown

Thread ID:





104886 Aug 24,2012 07:01 PM UTC Sep 26,2012 11:08 AM UTC ASP.NET Web Forms (Classic) 5
Tags: Tools
Adam Bruss
Asked On August 24, 2012 07:01 PM UTC

I am setting the selected node of a large tree view programmatically in a partial postback. I'm also making sure the node is expanded so it's visible. Now I want to have the tree scroll so the node is in view. How can I accomplish this? 

Thanks, Adam

Varalakshmi R.S [Syncfusion]
Replied On August 29, 2012 11:38 AM UTC

Hi Adam,

 Thanks for contacting Syncfusion forums.

 We suggest you to use “(element).scrollIntoView(false)” in script to resolve this issue. please refer the below code snippet to achieve this,







Adam Bruss
Replied On August 31, 2012 04:23 PM UTC

Varalakshmi R.S,

Could you please provide asp.net and/or C# code for a working example of this? I think it's a fairly common need.


Varalakshmi R.S [Syncfusion]
Replied On September 5, 2012 11:58 AM UTC

Hi Adam,


Thanks for the update.


We have prepared simple sample in which last node of the “Inbox” item will be shown when the TreeView is expanded. Please download the sample from the link given below,

<a rel='nofollow' href='http://www.syncfusion.com/downloads/Support/DirectTrac/98119/scrollintoview258958628.zip'>scrollintoview220096624.zip</a>

Kindly try the sample and let me know if it helps.




Adam Bruss
Replied On September 25, 2012 04:46 PM UTC

We use VS 2008 so I can't open the solution. There are no .aspx files in there either. Could you provide a 2008 asp.net web application solution that implements the scroll into view feature?

Varalakshmi R.S [Syncfusion]
Replied On September 26, 2012 11:08 AM UTC

Hi Adam,


We regret for the inconvenience caused.


We have prepared a simple web application in vs2008 to showcase this behavior and the same can be downloaded from the following link,

<a rel='nofollow' href='http://www.syncfusion.com/downloads/Support/DirectTrac/99241/F104886107619190.zip'>F104886100432492.zip</a>


Kindly try the sample and let us know if it works.





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