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.

Scroll a treeview so the selected node is shown

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 07:38 AM

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,

<code>

[Script]

(Selected_element).scrollIntoView(false);

</code>

Regards,

Varalakshmi


Adam Bruss
Replied On August 31, 2012 12:23 PM

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.

Thanks,
Adam

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

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.

 

Regards,

Varalakshmi


Adam Bruss
Replied On September 25, 2012 12:46 PM

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 07:08 AM

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.

 

Regards,

Varalakshmi


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.

;