Setting the item to appear first in a RadDataBoundListBox

5 posts, 0 answers
  1. Eitan
    Eitan avatar
    26 posts
    Member since:
    Jun 2012

    Posted 24 Mar 2015 Link to this post

    Hi,

    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?

    Thanks
    Eitan Barazani
  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 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.
    Regards,
    Ivaylo Gergov
    Telerik
     

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

     
  3. DevCraft banner
  4. 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?

     

  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 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.

    Regards,
    Rosy Topchiyska
    Telerik
    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
  6. Washington
    Washington avatar
    14 posts
    Member since:
    Oct 2013

    Posted 22 Jul 2015 Link to this post

    Awesome. Tnks
Back to Top
DevCraft banner