This is a migrated thread and some comments may be shown as answers.

Set focus to a new node via model without multiselect

1 Answer 89 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 2
Martin asked on 27 Feb 2013, 05:54 PM
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 (-:

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 04 Mar 2013, 04:26 PM
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.

Tags
TreeView
Asked by
Martin
Top achievements
Rank 2
Answers by
Tina Stancheva
Telerik team
Share this question
or