Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Dock > How to access scroll bar of a dock control?

Not answered How to access scroll bar of a dock control?

Feed from this thread
  • Charles avatar

    Posted on Feb 9, 2012 (permalink)

    Hi,

    I just want to scroll to a special position after the page include dock control posted back.
    I have read the article http://www.telerik.com/help/aspnet-ajax/grid-scroll-to-selected-item.html. 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"
        DockMode="Docked">
        <ContentTemplate>
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource1"
                ItemPlaceholderID="SubsystemContainer" Skin="Black">
                <LayoutTemplate>
                    <asp:placeholder id="SubsystemContainer" runat="server" />
                </LayoutTemplate>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td style="width: 100%; width: 150px; height: 45px;">
                                <asp:linkbutton id="LinkButton1" runat="server" commandname="Select">
                                <div>
                                <asp:Label ID="Label8" runat="server" Text='<%# Bind("CSNAME") %>'/>
                                </div>
                                </asp:linkbutton>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:RadListView>
            <asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="" selectcommand="">
    </asp:sqldatasource>
        </ContentTemplate>
    </telerik:RadDock>


    Any comment is appriciated. Thanks.

    Reply

  • Charles avatar

    Posted on Feb 13, 2012 (permalink)

    Would somebody give any idea?

    Reply

  • Slav Slav admin's avatar

    Posted on Feb 13, 2012 (permalink)

    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;
    }

    Regards,
    Slav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Charles avatar

    Posted on Feb 15, 2012 (permalink)

    Thanks, Slav.

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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Dock > How to access scroll bar of a dock control?
Related resources for "How to access scroll bar of a dock control?"

ASP.NET Dock Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]