Simple scrolling question

3 posts, 0 answers
  1. Charles Reid
    Charles Reid avatar
    5 posts
    Member since:
    Mar 2010

    Posted 14 Feb 2012 Link to this post

    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. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 15 Feb 2012 Link to this post

    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:

        - 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 >>
  3. Charles Reid
    Charles Reid avatar
    5 posts
    Member since:
    Mar 2010

    Posted 15 Feb 2012 Link to this post

    Thanks for the reply.  The part i was missing was which element to get and then set the scroll value.

Back to Top