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.

How to make hierarchical relation on Nodes,Copy ,delete and drag operation performed on node also auto reflect to another child node

Thread ID:

Created:

Updated:

Platform:

Replies:

119277 May 31,2015 01:05 AM Jun 8,2015 12:11 PM WPF 5
loading
Tags: Diagram
Yogesh
Asked On May 31, 2015 01:05 AM

Hi ,

There is parent child relationship on Node but how to make it like copy of one node child also copied automatically  and it also operate same on paste, delete. My mean operation perform on parent Node also apply to child Node.
Example: Node1 has child Node childNode1, If I copy  and paste Node1 then childNode1 automatically be there. If I drags Node1 childNode1 is also drags with Node1.

Thanks,
Yogesh Dahiya

Ranjitha Amirthalingam [Syncfusion]
Replied On June 1, 2015 07:53 AM

Hi Yogesh,
 
Thanks for using Syncfusion products.
 
Requirement: Need to Paste, Delete and Drag the Parent Node along with Child Node.
We have a suggestion to achieve your requirement by using Grouping feature. All the operations performed on the group (parent Node) also affect the individual items (child Nodes) in the group. We have provided simple sample to represent this. Please refer to the sample from the following link
 Sample Link:
group_119277



For more details about grouping feature, please visit our online help documentation link
Link: http://help.syncfusion.com/ug/wpf/Documents/groups.htm

Please let us know if you require further assistance on this,
Regards,
Ranjitha A.




Yogesh
Replied On June 2, 2015 12:01 AM

Hi Ranjitha,

Thanks for you response !

Using group it is possible, Can we also make group internally apply to nodes and it is not visible to user because user can Group\UnGroup. We have implemented the group functionality so the user can select and ungroup them. So how we would handle this scenerio?

Thanks & Regards

Ranjitha Amirthalingam [Syncfusion]
Replied On June 3, 2015 12:15 PM

Hi Yogesh,

Requirement: Single Interaction for Parent and Child Nodes

The Grouped Nodes can be interacted with single Action. So, the Selection for Node will show Group’s Boundary. We were unable to understand your requirement clear with provided details. We have some assumption about your requirement is “to select the Node inside Group directly instead of select the group while click on the child Node”.

If our assumption is different from your requirement, please share specific details screenshot (pictorial representation) to represent your requirement.

Please let us know if you require further assistance on this,
Regards,
Ranjitha A.

Yogesh
Replied On June 5, 2015 01:48 AM

Hi,

Yes requirement is correct.Using group we can achieved. Is there is another way around to do this approach. Our requirement is there is a comment Text node always present with Node and when user delete/copy/paste node comment Text node automatically behave.

Problem with this approach is user select node and Ungroup  after that Comment text node  is no longer in group and copy/paste/delete not working as expected.

Ranjitha Amirthalingam [Syncfusion]
Replied On June 8, 2015 12:11 PM

Hi Yogesh,

Requirement: Single Interaction for Parent and Child Nodes

We have analyzed your requirement. We have a suggestion to achieve your requirement by disabling the visibility of the Selector & Rotator for the Group (for example, the group will not be shown visually) and also when we drag any individual node in that group, the whole group should be move. Please refer the below suggestion.

Suggestion: To collapse the Selector & Rotator of the Group

We can collapsed the visibility of the Selector & Rotator of the Group by using the below code snippet. Now, the group selection will not be visible.


Code Snippet:


Group grp = new Group();

.

.

grp.Loaded += new RoutedEventHandler(grp_Loaded);


void grp_Loaded(object sender, RoutedEventArgs e)

{


Border border = (Border)VisualTreeHelper.GetChild(sender as Group, 0);


Grid grid = (Grid)VisualTreeHelper.GetChild(border, 0);


//Get the reference of Resizer of the Group

Resizer resizer = grid.FindName("PART_Resizer1") as Resizer;


//Collapse the visibility of the Resizer

resizer.Visibility = Visibility.Collapsed;


//Get the reference of Rotator of the Group

Rotator rotator = grid.FindName("PART_Rotator1") as Rotator;


//Collapse the visibility of the Rotator

rotator.Visibility = Visibility.Collapsed;


 }


Note: When we single click on the child Node, the group selection will not be visible because the Selector & Rotator of the Group is collapsed.


Please let us know if you require further assistance on this.

Regards,

Ranjitha A.


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.

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.

;