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
close icon

ControlNode Name property overriden


I recently upgraded to Essential Studio version (using the .NET 4.0 assemblies), and I'm experiencing a new issue. Basically, when a ControlNode is appended to the diagram model, it gets renamed "1", "2", etc, overriding the name it was given.  See the basic code snippet below:

    var node = new ControlNode(myControl, new RectangleF(0, 0, 100, 100))
        Name = "test"
    // node.name equals "test" as expected
    // node.name now set to "1", unexpected
    node.Name = "test";
    // node.name STILL set to "1", unexpected

Thanks in advance for your help,

6 Replies

RT Ramya Thirugnanam Syncfusion Team July 17, 2019 07:23 AM UTC

Hi Mark,  
Thanks for contacting Syncfusion support. 
Could you please check whether the same Name is assigned for multiple nodes? If yes, the node Name will be automatically changed, and the numeric value added to the name.  
For example: node Name is set as “test” for three nodes, then it will render as “test”, “test1” and “test2” respectively. It is the default behavior of our control.   
Ramya T 

ME Mark Eborn July 17, 2019 09:07 PM UTC

Hello Ramya,

I checked, and the same Name is NOT being assigned to multiple nodes. Also, in my case, the nodes are getting renamed to "1", "2", "3", etc. after I append them to the diagram model, not "test1", "test2", "test3", etc.

What is stranger is that once they've been appended, I can no longer change the Name property of the nodes.

This was not the behavior in the last version I was using (  


RT Ramya Thirugnanam Syncfusion Team July 18, 2019 11:30 AM UTC

Hi Mark,  
We have used your code example in our application. We could not able to replicate an issue at our end. Could you please share us the modified the sample , customization of diagram class and video to represent or replicate the issue? This will help us to serve you better. 
Ramya T 

ME Mark Eborn July 18, 2019 09:20 PM UTC

Hello Ramya,

I did some further testing and found that I can only reproduce the naming issues if I first call diagram.Model.Clear() or diagram.Model.RemoveAllChildren() prior to adding/appending all of the nodes. See the code snippet below:

using System;
using System.Drawing;
using System.Windows.Forms;
using Syncfusion.Windows.Forms.Diagram;
namespace WindowsFormsApp1
    public partial class Form1 : Form
        public Form1()
        private void LoadDiagram()
            // Calling either of these methods first causes the ControlNode naming issues
            // Nodes are renamed "1", "2", "3" after appended, unexpected
            // Nodes are renamed "a1", "b1", "c1" after appended, also unexpected
        private void AddNode(string name)
            var control = new Button();
            var rectBounds = new RectangleF(0, 0, 270, 170);
            var node = new ControlNode(control, rectBounds)
                Name = name
            Console.WriteLine("Node name before append: " + node.Name);
            Console.WriteLine("Node name after append: " + node.Name);

The console output is this:

Node name before append: 49070
Node name after append: 1
Node name before append: 49071
Node name after append: 2
Node name before append: 49072
Node name after append: 3
Node name before append: a
Node name after append: a1
Node name before append: b
Node name after append: b1
Node name before append: c
Node name after append: c1


RT Ramya Thirugnanam Syncfusion Team July 19, 2019 12:47 PM UTC

Hi Mark,  
Thanks for sharing details to replicate the issue. 
We can reproduce the issue. We have logged an issue report for it. The fix for this issue is estimated to be available on 26th July 2019.  
Now, you can track the status of your request through the below feedback link. 
Ramya T 

RT Ramya Thirugnanam Syncfusion Team July 26, 2019 09:41 AM UTC

Hi Mark,

The issue with “Node name has set as wrongly after clear and add the node into the Model" has been fixed and the patch for this fix can be downloaded from the following location.

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location: 

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location: 
NuGet Link:  

Assembly Version:
Installation Directions :
This patch should replace the files Syncfusion.Diagram.Base under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.5
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\\precompiledassemblies\\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.


Disclaimer :
Please note that we have created this patch for version specifically to resolve the following issue(s) reported in this/the Forum(s). 145993

If you have received other patches for the same version for other products, please apply all patches in the order received.

This fix will be included in our SP1 of Volume 2 which will be available in August 2019. 
Ramya T 

Live Chat Icon For mobile
Up arrow icon