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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom usercontrol within node => how to access the node from within the control

Thread ID:

Created:

Updated:

Platform:

Replies:

121612 Jan 7,2016 11:40 AM UTC Jan 8,2016 06:41 AM UTC WinForms 1
loading
Tags: Diagram
Lars
Asked On January 7, 2016 11:40 AM UTC

Hi!

I am experimenting with the diagram and try to achieve the following:

I want to create a (simple) graphical programming interface that executes a function block (here: a node with a custom usercontrol) and when it has finished it's task it shall activte all connected nodes.
I was able to create the nodes programmatically with help of the ControlsGalore sample and also to access all following nodes ("ToNode") with help of the SimpleDrillDown sample.
However, I need to access the node containing my usercontrol from within my usercontrol to determine which nodes are linked to the current node. This is where I am failing right now. How can I do this?

Thank you in advance!

Lars

Naganathan Ganesh Babu [Syncfusion]
Replied On January 8, 2016 06:41 AM UTC

Hi Lars,

 

The ControlNode’s “HostingControl” property is used to get the control which is assigned in the control node and the Node’s “EdgesLeaving” property is used to get the Nodes which are connected from the current node also the property “EdgesEntering” is used to get the Nodes which are connected to the current node. Please refer to the below code example and sample.    



 
Code Example:
 
[C#]
//Getting connected nodes with current node
ICollection collection1 = node.EdgesLeaving;

//Getting connected control nodes with current node
control += ((node1 as ConnectorBase).ToNode as ControlNode).HostingControl.GetType().ToString();
 
Sample:
 
Sample
 
Regards,
 
Naganathan K G


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

;