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

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

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

5 Replies

RA Ranjitha Amirthalingam Syncfusion Team June 1, 2015 11:53 AM UTC

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.





YO Yogesh June 2, 2015 04:01 AM UTC

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


RA Ranjitha Amirthalingam Syncfusion Team June 3, 2015 04:15 PM UTC

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.


YO Yogesh June 5, 2015 05:48 AM UTC

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.


RA Ranjitha Amirthalingam Syncfusion Team June 8, 2015 04:11 PM UTC

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.


Loader.
Live Chat Icon For mobile
Up arrow icon