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

How to get checked/Unchecked Nodes and its children in kendo Treeview

3 Answers 1772 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Srikanth
Top achievements
Rank 1
Srikanth asked on 31 Mar 2013, 06:27 AM
Hi,

Could anybody suggest me to get checked/Unchecked nodes  and its children in Kendo Treeview.

Thanks,
Srikanth

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 01 Apr 2013, 10:33 AM
Hi Srikanth,


You could get the checked/unchecked nodes easily via jQuery selectors.
E.g.
//all checked items
$("#treeview .k-item input[type=checkbox]:checked").closest(".k-item");


//children of checked items
$("#treeview .k-item input[type=checkbox]:checked").closest(".k-item").find(".k-group .k-item");

Wish you a great day!

 

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Chad
Top achievements
Rank 1
answered on 03 Mar 2016, 06:13 PM
I am trying to store the results from this into a variable Array and then pass it to the controller method using ajax. How would I do this? Everything I have tried has not worked. 
0
Dimiter Madjarov
Telerik team
answered on 07 Mar 2016, 08:51 AM

Hello Chad,

The following demo shows how to gather the ids of the checked nodes in an array. Some good examples on passing the array to the controller could be found on the following pages here or here.

Regards,
Dimiter Madjarov
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
Srikanth
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Chad
Top achievements
Rank 1
Share this question
or