Reputation: 9970
This only checks the parent nodes:
$(function()
{
$('#chkSelect').change(function()
{
if (this.checked)
{
$('#treeview input[type="checkbox"]').prop('checked', true);
}
else
{
$('#treeview input[type="checkbox"]').prop('checked', false);
}
});
});
Please note that the children nodes may or may not be expanded.
Upvotes: 0
Views: 4132
Reputation: 9970
Figured out how to do it:
var treeView = $("#treeview").data("kendoTreeView");
var userId = $('#user_id').val();
$('#treeview').find('input:checkbox:checked').each(function()
{ ...
Upvotes: 1