Hi,
I'm having trouble trying to remove a treeview item programmatically.
I add tree items roughly like so:
I then try to use the following method to remove the desired TreeItem:
For some reason it will only remove "TOP LEVEL" tree items and not items that are child nodes.
Do you know how I can programmatically remove a TreeItem that isn't a top level node?
I can see that it has something to do with the RadTreeView Items Collection, where it only lists all top level nodes.
Thank you for time,
Rob
I'm having trouble trying to remove a treeview item programmatically.
I add tree items roughly like so:
RadTreeViewItem item =
new
RadTreeViewItem();
item.Header =
"Header 1"
;
item.Tag = myProperty;
treeProducts.Add(item);
I then try to use the following method to remove the desired TreeItem:
//Get Selected Tree Item
RadTreeViewItem treeViewItem = (RadTreeViewItem)treeProducts.SelectedItem;
//Remove TreeView Item
this
.treeProducts.Items.Remove(treeViewItem);
For some reason it will only remove "TOP LEVEL" tree items and not items that are child nodes.
Do you know how I can programmatically remove a TreeItem that isn't a top level node?
I can see that it has something to do with the RadTreeView Items Collection, where it only lists all top level nodes.
Thank you for time,
Rob