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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Layout Manager Hierarchial Layout

Thread ID:

Created:

Updated:

Platform:

Replies:

77285 Oct 23,2008 04:52 PM UTC Nov 4,2008 12:51 PM UTC ASP.NET Web Forms (Classic) 1
loading
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?

Thanks,
Bryan


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!

Regards,
Ajeet


CONFIRMATION

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.

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

;