Stop expand when SelectedItem is set from binding

3 posts, 0 answers
  1. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 09 Apr 2014 Link to this post

    I bind SelectedItem to my viewmodel.    When an item is selected programmatically, I don't want the treeview to automatically expand to show it.  Later, if the user expands the treeview from the UI, and the selected item is revealed, it should of course be shown as selected.

    Is there a built-in way to do this or must I orchestrate it myself in my view model?
    I was hoping to find a property like AutoExpandToSelectedItem = false
  2. Martin
    Martin avatar
    1042 posts

    Posted 14 Apr 2014 Link to this post

    Hi Buzz,

    You can prevent the expanding of the TreeView to the selected item if you set the AutoScrollToSelectedItem property of the RadTreeView to False.

    <telerik:RadTreeView  AutoScrollToSelectedItem="False" />
    You can also keep in mind that if you set this property to True ​and the container for the selected item is not yet generated, the item will not be expanded.


    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 R3 2016 release webinar banner
  4. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 16 Apr 2014 in reply to Martin Link to this post

    Thank you
Back to Top