Golayout in org chart

I wan’t to do a golayout in my org chart. The problem is that I have 3 different job positions (manager, staff, employee). The diagram must be like this:

 staff 1 --|-- staff 2
 |                           |

employee 1 employee 2

How can I do that?
The other problem that I have is that when I have 2 employee I want them to appear centered and below the manager.

Thanks in advance!

Are you starting with OrgCharter, or with DataSetDemo? Or are you just using GoLayoutTree without adapting the code in DataSetDemo?

Are regular GoLayoutTree will automatically do what you want when there are just 2 employees for a manager. In DataSetDemo the GoLayoutTree has been customized to use GoLayoutTreeStyle.LastParents, where the "last parent" nodes use a different set of GoLayoutTreeNode properties for directing the layout of the "leaf" child nodes.
Regarding the different layout for staff than other employees, I believe you could do that by interposing a dummy node that is the "parent" for all of the "employees", while the "manager" restricts the layout of its "staff" to a BreadthLimit just wide enough for two "staff" nodes plus space for the links between them. Please give me some time to try this out.

Im not using DataSetDemo.
its a simple OrgCharter.

A dummy node is a 1px node?


Yes, that’s what I meant, and that node would not be part of your GoDocument, so it wouldn’t cause any confusion there or be visible to the user. That node would also have to be last in the list of children, to make sure it’s at the bottom.

I tried this and it basically worked fine, except that the layer spacing is wrong for some reason. I'm busy now -- I will investigate more when I get a chance.
Actually, I think the best solution is to actually add that dummy node to your GoDocument. It can be not Visible and zero sized, so no one will see it. But using a pretend "supervisor of all employees but not staff when there are both staff and employees reporting to a manager" node will help route the links to the employees correctly. There also needs to be a way to make a distinction between direct reports that are staff vs direct reports that are employees, and using a dummy "supervisor" node makes that clear to the layout algorithm in an easier fashion.
So organize your diagram as follows, if it were laid out normally:
| | |
staff 1 staff 2 (super)
| |
employee 1 employee 2
You need to make sure that the dummy supervisor node is the last of the children of the manager. This can involve making sure it sorts last, if you are sorting the children. If you are not sorting, you just need to add the link from the manager to the dummy supervisor node last.
Then you just need to override AssignTreeNodeValues:
protected override void AssignTreeNodeValues(GoLayoutTreeNode n) {
if (IsManagerWithBothStaffAndEmployees(n.GoObject)) {
n.BreadthLimit = 200; // or some value big enough for two nodes plus NodeSpacing
We have always intended to add another GoLayoutTreeStyle to support the arrangement of staff nodes on both sides (or perhaps just on one side) of a central line.
Since that isn't available yet, you need to do a fixup pass, to make sure the links go into the staff nodes from the proper direction. If you are using GoBasicNodes, this is just a matter of setting the GoBasicNode.Port.ToSpot appropriately. If the staff node is on the left side of the middle line, set it to GoObject.MiddleRight; if it is on the right side, set it to GoObject.MiddleLeft. If the node is centered (because there is an odd number of staff nodes for that manager), move it to the left and set Port.ToSpot to GoObject.MiddleRight.