0
我已經使用以下代碼創建了一棵樹。有沒有辦法從代碼中展開樹直到特定的子節點?SmartGWT擴展樹直到子節點
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();
我想在渲染樹時顯示「EditGrandChild」節點。我怎麼做?
感謝
我嘗試以下,但它不起作用。 TreeNode selectedNode = treeGrid.getData()。getAllNodes()[1]; treeGrid.selectRecord(selectedNode); – arvind 2013-02-13 18:03:02