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

Using MVVM to check boxes in TreeView. Not working when tree is collapsed.

1 Answer 113 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 06 Jun 2013, 04:33 PM
Hi,
I'm trying to user MVVM to bind to a TreeView and send in an array of ids and check the corresponding nodes. The recursive function works when I've expanded the root node. But it doesn't work initially when the root is collapsed.

Here is a JsBin that demonstrates the issue.

Thanks,
Jon

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Jun 2013, 09:13 AM
Hello Jon,

By default the TreeView loads the children on demand when the user expands a node. Thus the child nodes will not exist before expanding the root. You should use the loadOnDemand configuration if you wish all nodes to be immediately created. I have updated the jsBin to demonstrate the behavior when the loadOnDemand option is set to false.

Regards,
Daniel
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
Jon
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or