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

RadTree Selected Items

1 Answer 148 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Pelli
Top achievements
Rank 1
Pelli asked on 06 Aug 2015, 01:03 PM

Hi,

 Can we have a way to get all the child nodes selected just by selecting a parent node. It is possible through checkbox in treeview. But can we acheive the same through selection?

 

Thanks,

pelli

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 11 Aug 2015, 07:10 AM
Hello Pelli,

It is possible to achieve such behavior. You can use SelectionChanged event of the TreeView - then you can check if the selected item is root node - you can programmatically select its children (just don't forget to set the SelectionMode property of the TreeView to Extended or Multiple). For your convenience I implemented this approach in the attached project. I hope this will get you started. Please have in mind that this is an application logic and you should consider the behavior of the treeView in some cases - when the root node is deselected, when the user uses Ctr key to make a selection, etc. 

Please let us know in case any further assistance is needed.

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
Tags
TreeView
Asked by
Pelli
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or