This is a migrated thread and some comments may be shown as answers.

Scroll down automatically after a item is expanded

4 Answers 79 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Thomas LEBRUN
Top achievements
Rank 1
Thomas LEBRUN asked on 20 Nov 2009, 08:43 AM
Hi,

I need the following scenario: when an item is expanded, i need to scroll down automatically so the item expanded appears at the top of the treeview.
For example, when nothing is expanded, this looks like this:

http://img517.imageshack.us/i/capturegt.png/

But when I expand an item, this one appears automatically on top of the treeview, like this:

http://img256.imageshack.us/i/capture2a.png/

I've tried to play with BringIntoView, ScrollToVerticallOffset, etc.. but with no luck :(

Any ideas ?


Thanks !

4 Answers, 1 is accepted

Sort by
0
Thomas LEBRUN
Top achievements
Rank 1
answered on 22 Nov 2009, 10:43 AM
Nobody got an idea ?


Thanks !
0
Accepted
Kiril Stanoev
Telerik team
answered on 23 Nov 2009, 02:04 PM
Hi Thomas,

The reason why your scenario does not work the way you expect is because when you call BringIntoView on the "Playing The Angel" node, it is already into view. I have created a sample project that almost achieves the desired scenario. Have a look at it and let me know how it works for you.

All the best,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Thomas LEBRUN
Top achievements
Rank 1
answered on 23 Nov 2009, 02:15 PM
Hi Kiril,

Looks like perfect: I'll try it tomorrow and will let you know !


Thanks !
0
Thomas LEBRUN
Top achievements
Rank 1
answered on 24 Nov 2009, 08:42 AM
Hi Kiril,

This is perfect: thanks !


Thomas
Tags
TreeView
Asked by
Thomas LEBRUN
Top achievements
Rank 1
Answers by
Thomas LEBRUN
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or