I have a TreeGrid
in which I have a Tree
:
Tree nodesTree = new Tree();
TreeGrid navTreeGrid = new TreeGrid();
navTreeGrid.setData(nodesTree);
and I want everytime I'm adding a node to the tree to get focus on it.
More general, how can I from code to select a TreeNode
in a Tree
?
I know it is navTreeGrid.getSelectedRecord()
method but is not what I want.
Thank you!
You can use one of the selectRecord methods.