Can't change size or style of node at runtime / from method

Hello,

I'm trying to change the size and style of a diagram node by clicking a button in a client-side Blazor app. The method is:

    public void ChangeNode()
    {
        DiagramNode node = diagram.GetNode("node1");
        node.Width = 300;
        node.Style.Fill = "black";
    }

Nothing happens when clicking the button that calls the method (tried StateHasChanged() and DataBind() as well). It's giving me the following errors in the browser console:



I attached the relevant razor page. As basis, I used the sample file (BlazorApp1-535761195) from the thread below, which I modified with said method:

The sample file seemed to work at first with the ChangeNode() method, but after upgrading to the newest NuGet package, it also stopped working.

In addition, the whole diagram is extremely laggy when switching the selection from one node to the other.

Please let me know if this is an error with the component or if the app is not set up properly.

Thanks in advance!

Attachment: Index_c1055a1f.7z

1 Reply

AR Aravind Ravi Syncfusion Team August 20, 2020 09:01 AM UTC

Hi Phillip, 
 
We are unable to reproduce the reported issue at our end. We have created a client-side sample in our latest version with 18.2.54. When we change the node style and width at run time, both the style and width gets update properly for the node. We have attached a video demonstration of how we change the node style and selection also update properly 
 
 
We have attached a sample for your reference. Please find the sample in below link 
 
 
So please confirm us whether we try to reproduce the issue in same way that you tried at your end. Please share us a video demonstration of issue or modify the above sample replicating issue. This would help us to serve you better. 
 
Regards 
Aravind Ravi 


Loader.
Up arrow icon