This question is locked. New answers and comments are not allowed.
Hi Telerik!
How can I add a new rad treeview item in a selected container. I'm having problems with this code here:
It runs but nothing happens.
Basically, I'm trying to create a tree view dynamically.
How can I add a new rad treeview item in a selected container. I'm having problems with this code here:
private void AddItem(RoutedEventArgs e){ RadTreeView treeViewItem = (RadTreeView)e.OriginalSource; if (treeViewItem.SelectedContainer == null) { treeViewItem.SelectedContainer.Items.Add(new RadTreeViewItem() { Header = "New Section", IsInEditMode = true }); return; } treeViewItem.SelectedContainer.Items.Add(new RadTreeViewItem() { Header = "New Section", IsInEditMode = true }); treeViewItem.SelectedContainer.IsExpanded = true; }It runs but nothing happens.
Basically, I'm trying to create a tree view dynamically.