It seems if you use collapse() on nodes that have not yet been expanded than you will make those child nodes dissapear.
You can reproduce this on the TreeView / API demo page:
1) open http://demos.kendoui.com/web/treeview/api.html
- notice that "Item 2" is collapsed.
2) Click on the "Collapse All nodes" button
- notice that "Item 1" is collapsed
3) Click on "Item 2" in the tree
- notice that it will not expand.
- notice that clicking on "Item 1" will expand
4) Now refresh the page (http://demos.kendoui.com/web/treeview/api.html)
5) This time, Click on "Item 2" in the tree to expand it.
6) Click on the "Collapse All nodes" button
- notice that "Item 2" is collapsed
7) Click on "Item 2"
- notice that it expands.
You can reproduce this on the TreeView / API demo page:
1) open http://demos.kendoui.com/web/treeview/api.html
- notice that "Item 2" is collapsed.
2) Click on the "Collapse All nodes" button
- notice that "Item 1" is collapsed
3) Click on "Item 2" in the tree
- notice that it will not expand.
- notice that clicking on "Item 1" will expand
4) Now refresh the page (http://demos.kendoui.com/web/treeview/api.html)
5) This time, Click on "Item 2" in the tree to expand it.
6) Click on the "Collapse All nodes" button
- notice that "Item 2" is collapsed
7) Click on "Item 2"
- notice that it expands.