Set focus to a new node via model without multiselect

2 posts, 0 answers
  1. Martin
    Martin avatar
    39 posts
    Member since:
    Sep 2008

    Posted 27 Feb 2013 Link to this post

    My tree items is a class that has IsExpanded, IsSelected and my business object.
    I  have multiselect enabled.
    when I add a new item to SelectedItem, and set IsSelected on the new item I got two selected items. I don't want that, I just want to have the new item selected.

    I have the same problem when I search the tree, I end up having a lot of nodes selected.

    How can I solve this working only with the model and databinding?

    And don't tell me to remove multiselect (-:
  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 04 Mar 2013 Link to this post

    Hi Martin,

    I'm not sure I understand the scenario in which the issue is reproduced. Basically when you set the SelectionMode to Multiple, you allow the RadTreeView to have a collection of multiple selected items. So if you have a selected item in the RadTreeView, you can add a new item and select the new item as well. If this is your case, and you need to have only one selected item, then you can clear the RadTreeView.SelectedItems collection before adding a new selected item.

    If this isn't the case in which the issue is reproduced, please elaborate a bit more on your scenario and specifically - when and how you add a new selected item. Also, if you can send over a sample solution demonstrating the issue, we will gladly take a closer look at your implementation and advice you how to proceed.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top