Add node in treeview

2 posts, 0 answers
  1. Sankar
    Sankar avatar
    2 posts
    Member since:
    Apr 2015

    Posted 26 Jun 2015 Link to this post

    Hi Team,

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

    Thanks

    Sankar a

     

     

  2. Milena
    Admin
    Milena avatar
    204 posts

    Posted 30 Jun 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top