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

Indeterminate checkboxes for parents with children selected

2 Answers 102 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
jovaughn
Top achievements
Rank 1
Iron
jovaughn asked on 04 Jun 2020, 10:11 PM

I am unable to replicate this demo on page/data load. With data that is already checked the parent gets put into an indeterminate state if any of its children are checked.

The indeterminate state only appears if the user manually clicks one of the children check boxes.

https://dojo.telerik.com/ebAVASUp - here February is checked and its parent is in an indeterminate state on data/page load

My Code

<kendo-treeview name="DataRestrictionTree" load-on-demand="false" template="#=TreeViewTemplateSet(item.PathDescription,item.ModifiedBy,item.ModifiedDate,item.checked)#">
               <checkboxes check-children="true"/>
               <!--Batch attribute in hierachical datasource is needed so any change causes an update-->
               <hierarchical-datasource type="Kendo.Mvc.UI.DataSourceTagHelperType.Ajax" server-filtering="true" server-sorting="true" page-size="0" batch="true" on-request-end="RequestEnd">
                   <transport>
                       <read url="@Url.Action("GetDataRestrictionAssignments", "DataRestrictionAssignment")" datatype="json" data="DataAssignmentFilter" />
                       <update url="@Url.Action("UpdateDateRestrictions", "DataRestrictionAssignment")" datatype="json" />
                   </transport>
                   <schema>
                       <hierarchical-model id="PrimaryId" children="HasChildren"></hierarchical-model>
                   </schema>
               </hierarchical-datasource>
           </kendo-treeview>

2 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 09 Jun 2020, 03:50 PM

Hello ,

I've tested the scenario where a single child node is returned as checked and at my end its parent was shown as unchecked, whereas it should be in indeterminate state, since one of its children is checked and there others are unchecked. We will investigate whether this is a change in behavior introduced in the latest release and will write back.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ivan Danchev
Telerik team
answered on 12 Jun 2020, 01:50 PM

Hello ,

After further investigation, we decided to log the issue for fixing. I've created a Bug Report item on your behalf in the Feedback Portal: https://feedback.telerik.com/aspnet-core-ui/1471584-treeview-parent-node-checkbox-state-is-not-properly-updated-core

You can track this item to get notifications on changes in its status. A workaround is included in the bug report details.

I've updated your Telerik points for reporting this issue.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
TreeView
Asked by
jovaughn
Top achievements
Rank 1
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or