Hi Adam,
Thank you for contacting Syncfusion support.
We have validated your query. You can programmatically expand a node via any of the following methods
1. Using expandAll method
2. Using expandedNodes property
3. By mapping expanded: true while field declaration
We have prepared a sample to expand nodes programmatically in the nodeClicked event of the TreeView.
Code Example
nodeClicked: function(args) {
var node = this.$refs.tree1.getNode(args.node);
console.log(node);
//expand the nodes
this.$refs.tree1.expandAll([node.id]);
console.log("expanding node " + node.id);
// uncomment this to expand the selected node alone
// this.$refs.tree1.expandedNodes = [node.id]
} |
Could you please check the above sample and get back to us if you need any further assistance?
Regards,
Vinoth Kumar S