Setting the item to appear first in a RadDataBoundListBox

Thread is closed for posting
5 posts, 0 answers
  1. Eitan
    Eitan avatar
    26 posts
    Member since:
    Jun 2012

    Posted 24 Mar 2015 Link to this post


    I have a Windows Phone 8 application with RadDataBoundListBox with 50 or so items.
    How do I set/scroll the ListBox to display a particular item to be first seen by the user?
    I thought that BringIntoView will do the trick?

    Eitan Barazani
  2. Ivaylo Gergov
    Ivaylo Gergov avatar
    691 posts

    Posted 26 Mar 2015 Link to this post

    Hello Eitan,

    The BringIntoView method ensures that the item is in the viewport but this does not mean that it is the first visible item. The RadDataBoundListBox does not expose any other mechanism that can help you to achieve this.
    Ivaylo Gergov

    See What's Next in App Development. Register for TelerikNEXT.

  3. Washington
    Washington avatar
    14 posts
    Member since:
    Oct 2013

    Posted 16 Jul 2015 in reply to Ivaylo Gergov Link to this post

    So, how can I achieve this?

    If it's not possible, how can I synchronize two RadDataBoundListBox so the TopVisible item be the same on each?


  4. Rosy Topchiyska
    Rosy Topchiyska avatar
    586 posts

    Posted 21 Jul 2015 Link to this post

    Hello Washington,

    You can first call the BringIntoView method to ensure that the desired item is visible. Then you get the offset of the item and set the inner ScrollViewer offset to this value. I have attached a sample that demonstrates this.

    I hope this helps.

    Rosy Topchiyska
    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 Feedback Portal and vote to affect the priority of the items
  5. Washington
    Washington avatar
    14 posts
    Member since:
    Oct 2013

    Posted 22 Jul 2015 Link to this post

    Awesome. Tnks
Back to Top