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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Layout Manager Hierarchial Layout

Thread ID:





77285 Oct 23,2008 04:52 PM UTC Nov 4,2008 12:51 PM UTC ASP.NET Web Forms (Classic) 1
Tags: DiagramWebControl
Bryan Barnard
Asked On October 23, 2008 04:52 PM UTC

Is there a way I can add all of my nodes to my DiagramWebControl, providing information in the Node object for which nodes have a parent/child node relationship and then call the layout manager to arrange those nodes?


Administrator [Syncfusion]
Replied On November 4, 2008 12:51 PM UTC

Hi Bryan,

The parent/child relationship formed in Layoutmanager is determined by the order in which lineconnector is added to the graph manager.

The rank is generated by the GraphLayoutManger for every nodes based on the line connection between the nodes.

Based on the rank, the layout manager will position the nodes.

To override the default behavior, you can inherit DirectedTreeLayout manager and override the methods DoGraphLayout(), MakeLayout(), NormalizeNodes() for positioning the nodes, as follows:


protected override void DoGraphLayout()
Graph graph = this.SelectedNode as Graph;
if (graph.GraphType == GraphType.OneParentDirectedTree)
ArrayList lstToSort = graphToSort.TypeOrdered;

In this "ArrayList" sorts out the rank of every nodes.

Feel free to write to me if you need any further clarifications in this regard, Thanks!



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon