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

Filtered nodes still included in parent check state

3 Answers 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 13 Oct 2014, 07:47 PM
I'm creating a file explorer of sorts in which the selected node of the treeview on the left updates the content of the grid on the right. And when an item is checked in either widget the other shows it checked too. The treeview filters out the "File" type nodes and only displays the "Folder" type. I need the treeview to show a that a "Folder" node has child items checked if a "File" type node was checked in the grid on the right. However, when a node is filtered out it is no longer considered as a child of it's parent. How can I accomplish this?

3 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 14 Oct 2014, 01:52 PM
Hello Mike,

The indeterminate state is not refreshed on each dataSource change for performance reasons -- calculating the state requires traversal through most of the treeview nodes. Call the updateIndeterminate method to refresh the indeterminate state after modifying the DataSource.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mike
Top achievements
Rank 1
answered on 31 Oct 2014, 10:31 PM
What I'm looking for is the indeterminate start to include the items that have been filtered out. So a 'Folder' node in the tree will show the indeterminate check if a 'File' node has been selected, even though the 'File' type is filtered out.

Is this not possible?
0
Alex Gyoshev
Telerik team
answered on 03 Nov 2014, 09:09 AM
Hello Mike,

I'm afraid that this is not supported by the TreeView at this time -- the checked nodes are only inferred from the rendered checkboxes. If you need to change this, you can disable the out-of-the box checkChildren functionality and implement another algorithm, using the TreeView check event.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Mike
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Mike
Top achievements
Rank 1
Share this question
or