How to access scroll bar of a dock control?

4 posts, 0 answers
  1. Charles
    Charles avatar
    3 posts
    Member since:
    Jul 2011

    Posted 09 Feb 2012 Link to this post


    I just want to scroll to a special position after the page include dock control posted back.
    I have read the article But I stil have no idea how to find scroll area of a dock control.

    For an example,  when i scroll to the bottom item of the RadListView, and click it, the page will reload and the scrollbar for dock control will go back to top. How can I let it scrolling to the selected item? 

    <telerik:RadDock ID="RadDock2" runat="server" Skin="Black" Height="300px" Width="200px"
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource1"
                ItemPlaceholderID="SubsystemContainer" Skin="Black">
                    <asp:placeholder id="SubsystemContainer" runat="server" />
                            <td style="width: 100%; width: 150px; height: 45px;">
                                <asp:linkbutton id="LinkButton1" runat="server" commandname="Select">
                                <asp:Label ID="Label8" runat="server" Text='<%# Bind("CSNAME") %>'/>
            <asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="" selectcommand="">

    Any comment is appriciated. Thanks.
  2. Charles
    Charles avatar
    3 posts
    Member since:
    Jul 2011

    Posted 13 Feb 2012 Link to this post

    Would somebody give any idea?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Slav
    Slav avatar
    1355 posts

    Posted 13 Feb 2012 Link to this post

    Hello Charles,

    You can use the following approach to get the RadDock content container HTML element:
    function getDockContentContainer() {
        var dock = $find("<%=RadDock2.ClientID %>");
        return dock.get_contentContainer();

    Note that the ID of the RadDock control should be set to the one you have configured in your page.

    The returned reference to the container element can be utilized in order to set the scrollbar position via the scrollTop property as shown below:
    function pageLoad() {
        contentContainer = getDockContentContainer();
        contentContainer.scrollTop = 240;

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Charles
    Charles avatar
    3 posts
    Member since:
    Jul 2011

    Posted 15 Feb 2012 Link to this post

    Thanks, Slav.

    I 'll check to see if this way work for me, and report the result here.
Back to Top