Stop expand when SelectedItem is set from binding

3 posts, 0 answers
  1. Buzz
    Buzz avatar
    36 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 Ivanov
    Martin Ivanov avatar
    2603 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. Buzz
    Buzz avatar
    36 posts
    Member since:
    Oct 2010

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

    Thank you
Back to Top