RadListView, Pager and selected item

8 posts, 1 answers
  1. Philippe GRACA
    Philippe GRACA avatar
    29 posts
    Member since:
    Nov 2003

    Posted 23 Jun 2010 Link to this post

    I'm facing an intersting issue

    I want to select an item in a paged listview when the page is displayed.
    The selected item key is stored in session

    How can I achieve that?

    Thanks and regards

  2. Answer
    Rosen avatar
    3216 posts

    Posted 25 Jun 2010 Link to this post

    Hi Philippe,

    I have attached a sample page which demonstrates a basic implementation of the requested functionality.

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Henric
    Henric avatar
    11 posts
    Member since:
    Nov 2008

    Posted 03 Jun 2011 Link to this post

    This is interesting,
    however, is it possible to make the listview to actually show the selected item by default? 

    Something like this:

    1. Select the current page in the DataPager
    2. Make the listview "Scroll-into-view" of the selected item.

  5. Tony
    Tony avatar
    3 posts
    Member since:
    May 2009

    Posted 13 Jun 2011 Link to this post

    I would like something similar:
    How to get the first row in listview to be automatically selected?

  6. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 13 Jun 2011 Link to this post

    Hello Tony,

    Add the desired item to the RadLIstView SelectedIndexes collection:
    protected void Page_Load(object sender, EventArgs e)

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. Jim
    Jim avatar
    17 posts
    Member since:
    May 2010

    Posted 16 Feb 2012 Link to this post

    Is it possible to get the ListView to scroll to the selected item?  The routine that's posted works well but in my case, the highlighted item can be quite far down in the scrollable list.
  8. Tsvetina
    Tsvetina avatar
    1863 posts

    Posted 21 Feb 2012 Link to this post

    Hi Jim,

    Scrolling inside RadListView is not a built-in functionality (as the layout depends on the respective template that you specify), so the logic for scrolling to a certain item mostly depends on your own scenario. If the items container is a div, the solution should be similar to what is discussed in this thread:

    Let us know if you have questions related to the control's API for implementing this functionality.

    All the best,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  9. Jason Horspool
    Jason Horspool avatar
    10 posts
    Member since:
    Oct 2006

    Posted 10 May 2012 Link to this post

    **** solved ****
    "Is there any way to do the selection after databinding has happend on the RadListView?  We need to do some logic against each row to determine if the row should be selected."

    I found the 'FireCommandEvent' method to select the items!

Back to Top
DevCraft R3 2016 release webinar banner