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

TreeView: checkChildren property not to uncheck Parent when child unchecked

1 Answer 307 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Fady
Top achievements
Rank 1
Fady asked on 23 Jan 2015, 01:20 PM
We are using kendo treeview to display hierarchial datasource in cshtml.

One of our requirement is to check/uncheck all children checkboxes when a parent is checked/unchecked, so we used checkChildren property to
achieve this.

@(Html.Kendo().TreeView()
      .Name("SampleList")
      .Checkboxes(chk => { chk.CheckChildren(true); })
      .DragAndDrop(false)
      .ExpandAll(true)
.....


But the issue is when we uncheck a child, the parent should not get unchecked, even if we have one child inside the parent.

Can you please provide jquery code snippet to achieve this?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 27 Jan 2015, 09:37 AM
Hello,

I created an example that demonstrates checking the children without using the checkchildren option in the check event. Please check it and let me know if it works for you.

Regards,
Daniel
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeView
Asked by
Fady
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or