Go top with ListHeader

Thread is closed for posting
3 posts, 0 answers
  1. Vinh
    Vinh avatar
    2 posts
    Member since:
    Oct 2012

    Posted 01 Sep 2014 Link to this post

    I'm using RadDataBoundListBox for my project. It's realy good but I dont know how to scroll to top of list when I use ListHeader too. The method BringIntoView just scroll to top item, but not ListHeader. Please help me. Thank you
  2. Rosy Topchiyska
    Rosy Topchiyska avatar
    586 posts

    Posted 04 Sep 2014 Link to this post

    Hi Vinh,

    Thank you for contacting us.

    Indeed the BringIntoView() method works only with items from the ItemsSource of the RadDataBoundListBox. What you can do is to find the internal ScrollContentPresenter and set its offset to 0. You will have to do this twice because of the UI virtualization of the listbox items - if the header element has been recycled, then the first time you set the scroll offset to 0, it will scroll to the first item. After the items are realized, you will have to scroll again to offset 0. I have attached a sample project that demonstrates how to do this.

    I hope this helps. Please, let us know if you have further questions.

    Rosy Topchiyska

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Vinh
    Vinh avatar
    2 posts
    Member since:
    Oct 2012

    Posted 04 Sep 2014 in reply to Rosy Topchiyska Link to this post

    Thank you. It worked :D
Back to Top