Scrolling to the beginning of the list

2 posts, 0 answers
  1. Igor
    Igor avatar
    29 posts
    Member since:
    Mar 2012

    Posted 06 Feb 2015 Link to this post

    I have a RadDataBoundListBox with a quite big header defines using ListHeaderTemplate. I need a way to scroll to the beginning of the list, so the header is not visible.

    I could you BringIntoView when there is at least one item in the list, but how do I do it if the list is empty?
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    550 posts

    Posted 11 Feb 2015 Link to this post

    Hello Igor,

    Thank you for contacting us.

    Unfortunately, when there are no items in the list box, you can not scroll to a position where the the header is hidden. It is part of the scrollable content of the list box and when there are no items, the bottom of the header is the bottom of the scrollable content. If you wish to hide the header when there is no data, then you can set the ListHeaderDisplayMode property to "WithDataItems". Finally, I have attached a sample project that demonstrates how you can scroll to the bottom of the list box.

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

    Regards,
    Rosy Topchiyska
    Telerik
     

    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. DevCraft banner
Back to Top