This is a migrated thread and some comments may be shown as answers.
Simple scrolling question
2 Answers 23 Views
This is a migrated thread and some comments may be shown as answers.
Charles Reid
Top achievements
Rank 1
Charles Reid asked on 14 Feb 2012, 08:03 PM
Is it possible to display the radWindow at a scroll location.  I'm thinking of things like .scrollTop(location)?  I don't mean setting the location of the radWindow.  I mean showing the radWindow with a scroll bar but with the scroll bar value set to display below the top of the page.  I can calculate the location that I want to be visible and I can get the name of the control within the radWindow that I want visible, but i haven't figured out how to move the scroll bar programmatically.

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 Feb 2012, 01:26 PM
Hello Charles,

You can easily achieve what you need by using some javascript which, however, differs, based on your exact scenario. Here are some notes I prepared for you:

1) Obtain a reference to the RadWindow client object - this should be done either by using $find or GetRadWindow function, depending from where you do so.

2) Change the scroll position. There are basically two general cases:

    - if you are using a separate page and you change the scroll onload of this content page, you could directly use window.scrollTo which is standard javascript:

http://www.w3schools.com/jsref/met_win_scrollto.asp

    - if you are using a RadWindow with ContentTemplate you could obtain a reference to the DIV element which holds the content by using oWnd.get_contentElement() method. After that you can simply change the scrolling position as you would do with any standard DIV element.

I hope that my notes are helpful, in case you need further assistance, please share some sample, runnable code so that I can get a better understanding on your exact configuration and I will modify it in order to meet your requirements.

All the best,
Svetlina Anati
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Charles Reid
Top achievements
Rank 1
answered on 15 Feb 2012, 02:14 PM
Thanks for the reply.  The part i was missing was which element to get and then set the scroll value.

Charles
Asked by
Charles Reid
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Charles Reid
Top achievements
Rank 1
Share this question
or