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

Changing a text node content by doubleclicking on it

Hello,

I want to know if an event occurs after editing a text node by double clicking.
Because I want to validate it.


Thanks...


3 Replies

J. J.Nagarajan Syncfusion Team June 10, 2008 07:21 AM UTC

Hi Yener,

Currently there is no built in support to fire an event after edit the TextNode. You can write your own delegate and call that function pointer after the EndEdit. Please refer to the following code snippet.

public delegate void NodeEndEdit(object sender, EventArgs e);
public event NodeEndEdit nodeEndEdit;

this.nodeEndEdit += new NodeEndEdit(MainForm_nodeEndEdit);
void MainForm_nodeEndEdit(object sender, EventArgs e)
{
Console.WriteLine("NodeEndEdit Event fired");
}

private void menuItem8_Click(object sender, EventArgs e)
{

if (m_editor.IsEditing)
this.nodeEndEdit(this, new EventArgs());
m_editor.EndEdit(true);
}

Please refer to the attached sample that demonstrates this completely.

http://websamples.syncfusion.com/samples/Diagram.Windows/F74302/main.htm

In this sample when you double click on the text node you can edit it. Whne you click on Update->EndUpdate menuitem, an event will be triggered for the validation and it ends up the editing.

Please let me know if this helps.

Regards,
Nagaraj



BC Blanca Calderon February 8, 2011 09:47 AM UTC

Hi,

I'm interested in this example but it doesn't work anymore. Could you post it again?

Thanks in advanced,

Blanca



BM Bala Murugan A.S Syncfusion Team February 17, 2011 07:23 AM UTC

Hi Blanca,

Thanks for the update.

Please find the attached sample from the below link.
QuickStart210605058.zip

Kindly try the above sample and let me know your concerns.

Regards,
Bala Murugan A.S


Loader.
Live Chat Icon For mobile
Up arrow icon