Autoscroll to an item

2 posts, 1 answers
  1. Jim
    Jim avatar
    17 posts
    Member since:
    May 2010

    Posted 17 Feb 2012 Link to this post

    I'm working on a project where the user can select a "details view" of an item in the Radgrid.  Upon selection, a new page is displayed with the item's details plus a ListView down the left side of the page with hyperlinks to any of the other items that appeared in the previous RadGrid.  Is it possible to have the ListView autoscroll to the currently selected Item Number?  Please see the attached graphic. 
  2. Answer
    Veli avatar
    2002 posts

    Posted 21 Feb 2012 Link to this post

    Hello Jim,

    You can try setting unique id attributes the container in every data item in RadListView:

    <telerik:RadListView ID="RadListView1" runat="server"
            <div class="item" id='item<%# Eval("ID") %>'>

    Once every item container has an ID, you can append the ID of the required item to the URL hash (e.g. http://mydetailspage.aspx#item2.0.0).

    Thus, when the page is opened, the listview will be scrolled to the respective item.

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