field.setTitle("Tree from local data");
field.setCanSort(false);
treeGrid.setFields(field);
Tree tree = new Tree();
tree.setModelType(TreeModelType.PARENT);
//tree.setRootValue("1");
tree.setNameProperty("Name");
tree.setIdField("EmployeeId");
tree.setParentIdField("ReportsTo");
tree.setShowRoot(true);
EmployeeTreeNode root = new EmployeeTreeNode("4", "1", "Charles Madigen");
EmployeeTreeNode node2 = new EmployeeTreeNode("188", "4", "Rogine Leger");
EmployeeTreeNode node3 = new EmployeeTreeNode("189", "4", "Gene Porter");
EmployeeTreeNode node4 = new EmployeeTreeNode("265", "189", "Olivier Doucet");
EmployeeTreeNode node5 = new EmployeeTreeNode("264", "189", "Cheryl Pearson");
tree.setData(new TreeNode[]{root, node2, node3, node4, node5});
tree.setRoot(root);
treeGrid.setData(tree);
return treeGrid;
}