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

How to add Connectors programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

151347 Feb 7,2020 10:28 AM UTC Feb 11,2020 08:59 AM UTC Blazor 3
loading
Tags: Diagram
Manuel
Asked On February 7, 2020 10:42 AM UTC

Hi,

I'd like to add nodes and connectors programmatically with a UserHandle.
On the OnUserHandleMouseDown event i have created a new node that relates
to the selected node and also added a connector. But the connector is not shown.

Btw: This works on the OnInitialized() without any problem.

        public async void OnApplyShortcut(UserHandleEventsArgs args)
        {
            var selectedNode = this.Diagram.SelectedItems.Nodes.FirstOrDefault();
            if (selectedNode == null) return;

            var relatedNode = new DiagramNode();
            this.Nodes.Add(relatedNode);

            var connector = new DiagramConnector();
            connector.SourceID = selectedNode.Id;
            connector.TargetID = relatedNode.Id;

            this.Connectors.Add(connector);
        }

Naganathan Ganesh Babu [Syncfusion]
Replied On February 10, 2020 12:11 PM UTC

Hi Manuel, 
 
The reported issue is a known issue and we have already fixed this issue. The fix will be included in our weekly nuget package release on 11th February, 2020.  
 
 
Regards, 
 
Naganathan K G 


Manuel
Replied On February 10, 2020 12:33 PM UTC

Thanks for the information.

Shyam G [Syncfusion]
Replied On February 11, 2020 08:59 AM UTC

Hi Manuel, 
Thanks for your update. 
Regards, 
Shyam 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.

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

Live Chat Icon For mobile
Live Chat Icon