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

ControlNode within Group does not activate

Thread ID:





88624 Aug 3,2009 05:08 PM UTC Oct 19,2010 10:17 PM UTC WinForms 2
Tags: Diagram
Doug Wendel
Asked On August 3, 2009 05:08 PM UTC

I am having a bugger of a time trying to find a solution to this problem. Basically what I need is to have direct control over a windows forms control placed inside a Group node. For example, one node I need to create has several levels of text, a drop-down control, and then a "footer". I have seen one post stating that it's not possible to activate the windows forms control while inside the Group, though this post was 2 years old so I'm not sure if this is still the case. I cannot find a way to make it work so perhaps so. Solving this scenario would be the ideal solution. I see that there is a CanUngroup property of the Group node but zero documentation as to what this does - anyone know?

As an alternative, I've tried creating my own node subclass to get around this problem. I can render it how I'd like, but the problem is in how to place a windows forms control inside that node. I could definitely be missing something however it doesn't appear that there are enough hooks to do this properly. My hack was to give the subclassed Node a reference to the diagram contro (the Node class does not have a Controls property), and then add a Windows Forms control to the diagram and attempt to position within the diagram such that it shows up inside my new node. This only partially works. The control does show up in the grid but I cannot position it exactly where I want. Maybe I can get it all sorted out but resizing the grid or scrolling messes the whole thing up. I realize it's a hack anyway - probably not recommended but I'm running out of ideas. I also had the thought this morning that zooming the grid will almost certainly not work. The diagram will resize but the winforms control will not.

Does anyone have a thought as to how I might accomplish this task?

Gowri Manohari D [Syncfusion]
Replied On August 4, 2009 04:47 AM UTC

Hi Doug,

Thank you for choosing Syncfusion products.

We have analyzed your requirement. Diagram control supports separate Node type "ControlNode" in order to add windows controls inside of it. ControlNode is a node used for hosting the windows controls inside of it. You can accomplish your task via this ControlNode.

The below is the sample code for adding Windows Forms TextBox in ControlNode

TextBox txt = new TextBox();
Syncfusion.Windows.Forms.Diagram.ControlNode c=new ControlNode (txt,new RectangleF (0,0,txt.Width,txt.Height));

For more details about ControlNode please refer the sample from DashBoard->Windows Samples->Diagram Samples->Editable Diagrams->Controls Galore


Aubyn Crawford
Replied On October 19, 2010 10:17 PM UTC


I have used the ControlNode successfully (including the serliazation you use in your example) - BUT this does not appear to still work inside a group. (The Controls Galore demo's inheritance from ControlNode, but not inclusion in a group).

I can select the ControlNode as part of the group, but the mouse events never appear to be transmitted into the control hosted in the ControlNode. Is there something simple I have missed?



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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