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

Add node in treeview

1 Answer 82 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Sankar
Top achievements
Rank 1
Sankar asked on 26 Jun 2015, 03:31 PM

Hi Team,

    I am using RadTreeview with HierarchicalDataTemplate using MVVM. How can i add node under the selected node.

Thanks

Sankar a

 

 

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 30 Jun 2015, 11:08 AM
Hi Sankar,

It depends on your scenario. You can use SelectedItem property of the TreeView to get the item which is selected and then you can work with your business collection and add items in the view models. If you are using ObservableCollection the treeView will be automatically updated when you update its ItemsSource.

I hope this information helps. Please let us know if you need any further assistance. In this case could you elaborate a bit more on your scenario by sending us a sample project or code-snippet. E.g. it would be useful to see the structure of your view models and if you need to add the node under the selected item on the same level or as its child. Thank you in advance for your cooperation.

Regards,
Milena
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TileView
Asked by
Sankar
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or