Set scroll position inside radwindow

2 posts, 1 answers
  1. James
    James avatar
    10 posts
    Member since:
    Jan 2013

    Posted 07 Oct 2013 Link to this post

    I have a RadWindow that scrolls vertically, since its content is rather long.

    Is there a way to set the scroll position inside of the radwindow via javascript? Specifically I want to scroll to the top of the radwindow after a user clicks a button within it.
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3551 posts

    Posted 08 Oct 2013 Link to this post

    Hello James,

    You can use the scrollTop property of the element with the scrollbar and the OnClientShow event of the RadWindow to set it to the desired value. It is done in the same manner as with any other div:
    <div style="width: 100px; height: 100px; overflow: auto;" id="test">
        <div style="height: 1000px; background: yellow;">
    <telerik:RadWindow ID="RadWindow1" runat="server" OnClientShow="OnClientShow" OpenerElementID="Button1">
            <div id="mainHolder" style="width: 100%; height: 100%; overflow: auto;">
                <div style="height: 1000px; background: yellow;">
    <asp:Button ID="Button1" Text="open the RadWindow" runat="server" />
    <script type="text/javascript">
        function OnClientShow(sender, args)
        function pageLoad()

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top