We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

HierarchicLayout with multiple parents

I have just upgraded to version 9.3, and am having trouble with using the HierarchicLayout manager when a node has multiple parents. This feature worked reasonably well in version 8.3.

I've attached 3 screenshots to illustrate these steps, using the HierarchicTrees_2010 sample code:

- Run

- frmMain displays a set of nodes in a tree layout; each node has only a single parent

- I reversed the direction the connection on the bottom-most node to create a middle node with two parents

- Clicked on the "top-to-bottom" button to refresh

- frmMain refreshes, but the layout is poor.

Am I correct that multiple parents is a feature of this layout manager? Is there a better approach?

Thanks.





Screenshots_112b1585.zip

3 Replies

AA Amsath Ali M Syncfusion Team October 11, 2011 05:52 AM UTC

Hi Linda,

Thanks for using Syncfusion products.

We are able to reproduce the issue reported by you. We suggest you to set the HierarchicLayoutManager’s “ParentPosition” property to ‘Default’ to get the old behavior. Please refer the below code to achieve your requirement.

Here is the code:
[C#]
HierarchicLayoutManager dtlm = new HierarchicLayoutManager(this.diagram1.Model, 0,
DEF_LAYOUT_VERTICAL_OFFSET, DEF_LAYOUT_HORIZONTAL_OFFSET);

// Specifies parent position in the layout
dtlm.ParentPosition = ParentPositions.Default;


Here is the Sample:
Hierarchic Trees Layout-303438034.zip


Please try the above sample and let us know if you have any queries.

Regards,
Amsath Ali. M





LC Linda Clemens October 12, 2011 02:50 PM UTC

Thank you - that solution worked perfectly!



AA Amsath Ali M Syncfusion Team October 13, 2011 04:09 AM UTC

Hi Linda,

Thanks for the update.

Please let us know if you require any further assistance on this. We would be happy to help you out.

Regards,
Amsath Ali. M



Loader.
Live Chat Icon For mobile
Up arrow icon