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

Can i save the parent node itself

3 Answers 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
dharma krovvidi
Top achievements
Rank 1
dharma krovvidi asked on 07 May 2010, 09:41 AM
Hi all,
I would like to get a solution for me. I want to save the parent node in my treeview in three aspects
1.saving the parent node when no childitems are selected.
2.saving the parent node when some childnodes are selected and some are not i.e intermediate state
3.saving the parent node when all childs are selected.

Let me know the possiblities of saving the parent node in a treeview,try to suggest a sample code for this if possible..

Regards
Dharma

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 12 May 2010, 09:00 AM
Hello dharma krovvidi,

We will gladly help you, but can you please elaborate what do you mean by "saving the parent node"?

All the best,
Valentin.Stoychev
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.
0
dharma krovvidi
Top achievements
Rank 1
answered on 20 May 2010, 09:13 AM
Hi Valentin

Sry for the late response. My requirement is to save parent node only, not the child nodes in a tree.

Regards
Dharma.
0
Tina Stancheva
Telerik team
answered on 25 May 2010, 06:40 PM
Hi dharma krovvidi,

I am not sure that I understand your scenario correctly. What do you need to save from the parent node - its header in another collection or database? Can you please elaborate on that a bit more. Also, when you say "selected", do you mean selected or checked?

I prepared a sample project illustrating how you can traverse the RadTreeView itemsSource collection and check the RadTreeViewItem's check state and then display the checked/unchecked and indeterminate items in different ListBoxes.

However, if your approach requires getting an item's parent, you can use the RadTreeViewItem ParentItem property that holds the parent node of each item.

Please, take a look at the project and let me know if it helps or if your scenario requires a different approach.

Thank you in advance.

Kind regards,
Tina Stancheva
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
dharma krovvidi
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
dharma krovvidi
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or