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

Programatically checking childnodes

2 Answers 539 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Niranjan
Top achievements
Rank 1
Niranjan asked on 18 Dec 2017, 04:32 AM

Hello,

I want to first retrieve the node that is checked and then programatically check its child nodes.
Any help is appreciable!

Thanks,

Niranjan

2 Answers, 1 is accepted

Sort by
0
Accepted
Neli
Telerik team
answered on 19 Dec 2017, 01:54 PM
Hi Niranjan,

You can subscribe to the check event of the TreeView. In the event handler you can retrieve the checked node in the following way:
var checkedNode = e.node

Then you can retrieve the data of the node , using the dataItem method. In case the node has child nodes, you can check them programmatically. An approach for checking nodes is described in the linked how-to article. The same approach is used in the following Dojo example


The following Demo 
Regards,
Neli
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Niranjan
Top achievements
Rank 1
answered on 02 Jan 2018, 01:01 PM

Hello Neli,

The solution provided works like a boon!

Thank you,
Niranjan

Tags
TreeView
Asked by
Niranjan
Top achievements
Rank 1
Answers by
Neli
Telerik team
Niranjan
Top achievements
Rank 1
Share this question
or