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

remove checked items

1 Answer 41 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Monika Kogler
Top achievements
Rank 1
Monika Kogler asked on 11 Oct 2010, 12:45 PM
hi,
i'm trying to remove all checked items from my treeview. when i try to delete the items directly in my foreach-loop, an error occurs. the other way ist first to save all items from the checked items und dann traverse the tree to find each of this items - which is pretty slow. is there any better way to delete all checked items?

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 14 Oct 2010, 03:06 PM
Hello Monika Kogler,

Please accept my apology for the delayed response. You can remove the selected / checked RadTreeViewItems while iterating through the RadTreeView  SelectedItems/ CheckedItems collection. If the current item has already been removed as a child of already removed item - continue to the next selected/checked item, else  - remove it.    

I attached a sample solution and let me know if it satisfies your needs.

I will be glad if I can further assist you.

All the best,
Petar Mladenov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Monika Kogler
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or