Question

I have created a tree using the following code. Is there a way to expand the tree till a particular child node from the code?

TreeGrid treeGrid = new TreeGrid();
Tree tree = new Tree();
tree.setRoot(new TreeNode("root", new TreeNode("File",
    new TreeNode("FileChild")), new TreeNode("Edit", new TreeNode(
        "EditChild", new TreeNode("EditGrandChild"))), new TreeNode(
            "Window")));
treeGrid.setData(tree);
treeGrid.draw();

I want to display the "EditGrandChild" node when the tree is rendered. How do i do that?

Thanks

Was it helpful?

Solution

I used to open some parts of a treegrid depending on the result of a search and I used this bits of code

TreeNode[] tabNode = leTree.getParents(t);
    leTree.openFolders(tabNode);

Hope it could help...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top