Changing the order of nodes on a row in autolayout

Hi,
does anyone know of a way to alter the order of a node when it is generating a layout?

example:
I have a node with a boolean on it, the diagram is a horizontal tree (each node has one parent and up to 2 children going left to right), think of it like a family tree.
When a node has the boolean set to true, it should be the top node of that pair.

how would I go about doing this using the autolayout feature, or would I have to create the nodes manually and create their spacing manually to do this?

1 Reply

AP Arun Prasad Matheshwaran Syncfusion Team June 20, 2018 01:17 PM UTC

Hi Damien Holley, 

Thanks for using Syncfusion Products, 

We can achieve the mentioned scenario in the sample itself. When any child of a tree node is clicked, that node will be moved to the top position of tree. We have created a sample to demonstrate the last child node updating to top position during runtime. 
Please find the below code snippet that we tried to achieve the scenario. 
Code Snippet: 
// We just need to move the item of the data model collection into first index and then have to update the layout. 
datamodel.employee.Insert(0, emp.Clone()); 
datamodel.employee.Remove(emp); 

Sample Link: 

Please let us know if this sample fulfils your requirement and let us know if need any further assistance. 

Thanks, 
Arun Prasad M 


Loader.
Up arrow icon