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

How to change the node text

Hi,
i would like to know how can i edit the node text. As per my requirement i created some symbol without Labels, i would like after dropping my Symbols from Palette, that my symbol to be automatic labeled with Text, and to be always editable after double clicking the node.

Best Regards
Hayssam

5 Replies

AA Amsath Ali M Syncfusion Team March 15, 2013 07:21 AM UTC

Hi Hayssam,

 

Thanks for using Syncfusion products.

 

1. I would like after dropping my Symbols from Palette, that my symbol to be automatic labeled with Text

We suggest you to use the Diagram’s “NodeDropFromPalette” event to add labels to the node after dropping the symbols from paletteGroupBar. Please refer the below code snippet to achieve your requirement.

 

Here is the code:

[C#]

protected void DiagramWebControl1_NodeDropFromPalette(object sender, Syncfusion.Web.UI.WebControls.Diagram.NodeDropFromPaletteEventArgs e)

        {

            if (e.Node is PathNode || e.Node is Group)

            {

                PathNode node = e.Node as PathNode;

                if (node != null)

                    node.Labels.Add(new Syncfusion.Windows.Forms.Diagram.Label( node, node.Name));

                else

                {

                    Group gnode = e.Node as Group;

                    node.Labels.Add(new Syncfusion.Windows.Forms.Diagram.Label (gnode, gnode.Name));

                }

            }

        }

Here is the sample:

F107749.zip

2. Label Text always editable after double clicking the node

Currently we don’t have support to edit the labels while double clicking the node. This has been already confirmed as a feature. Please create a DT incident for your query so that we can update the patch for this feature.

You can create the DT incident from the following link.
<
http://www.syncfusion.com/account/dashboard>

In the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.

 

 

 

Please let us know if you have any queries.

 

Regards,

Amsath Ali. M



HH Hayssam Hassan March 18, 2013 08:51 AM UTC

Hi Amsath Ali. M,

Thanks for your update,
for the double-click Feature, there is an Example at your Online-Sample
ASP.NET --> Diagram -->Getting Started --> Nodes --> the Rectangle Node with the Text "TextNode1"
after double clicking i can edit the node.
OR
Windows Forms --> Diagram -->Getting Started --> Nodes --> the Rectangle Node with the Text "TextNode1"

i would like to have the same Feature like the Windows Forms Example


AA Amsath Ali M Syncfusion Team March 20, 2013 11:30 AM UTC

Hi Hayssam,

 

Thanks for your update.

 

Currently we don’t have support to edit the labels while double clicking the node in DiagramWeb. This has been already confirmed as a feature and the implementation of this feature is in progress. For this, Please create a DT incident for your query so that we can update the patch for this feature.

You can create the DT incident from the following link.
<
http://www.syncfusion.com/account/dashboard>

In the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.

 

Please let us know if you have any queries.

 

Regards,

Amsath Ali. M



HH Hayssam Hassan May 21, 2013 03:49 PM UTC

hi Amsath Ali. M,

thanks for ur code, still have some problems for automatic labeling the node after dropping them from the Palette. the problem is that every symbol (node) if its a PathNode or Group after the first dropping they are not labeled, after the second drop, third, etc.... from the same node, then they will be automatic labeled.
Need help

Best Regards
Hayssam



AA Amsath Ali M Syncfusion Team May 22, 2013 11:42 AM UTC

Hi Hayssam,

 

Thanks for your update.

 

We are afraid that we are unable to reproduce the issue reported by you at our end. Could you please share us more information probably a simple sample which reproduces the reported issue, this will help us to reproduce the issue effectively at our end and to provide a better solution to you?

 

Please refer the below attached video and let us know if you have any queries.

 

Regards,

Amsath Ali. M



video_1558ae2d.zip

Loader.
Live Chat Icon For mobile
Up arrow icon