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

Raise an event before Delete

Thread ID:





89884 Sep 9,2009 04:12 PM UTC Sep 11,2009 06:09 AM UTC WinForms 3
Tags: Diagram
Stephane Guerillot
Asked On September 9, 2009 04:12 PM UTC


I have a Diagram containing different Nodes. I would like to catch an event before any suppression of Nodes.

I tried, to override the ProcessKeyDown and ProcessKeyUp functions in a custom SelectTool (inheriting from SelectTool, and registered instead the original one), but the events seemed to be raised after suppression. Same result with the Windows EventHandler (OnKeyDown).

How can I have access to the Controller.SelectList before suppression ?

Thanks for your answer.

Gowri Manohari D [Syncfusion]
Replied On September 10, 2009 09:41 AM UTC

Hi Stephane,

Thank you for choosing Syncfusion products.

Diagram does not have specific for NodeDelete. We can indirectly trigger some event before delete. For that we can EventSink_NodeCollectionChanging Event, it will fire adding or removing the nodes in diagram. We can achieve your requirement with the help of this method. Please refer the code snippet.

diagram1.Model.EventSink.NodeCollectionChanging+=new CollectionExEventHandler(EventSink_NodeCollectionChanging);
private void EventSink_NodeCollectionChanging(CollectionExEventArgs e)
if (e.ChangeType == CollectionExChangeType.Remove)
// your code

e.ChangeType indicates whether the node has been added or node has been deleted. Based on this changetype we can get the Controller.SelectionList before delete.

Let me know if you have any further questions in this regard.


Stephane Guerillot
Replied On September 10, 2009 03:53 PM UTC

Thanks for your answer.

I didn't use the eventsink handler, but I've found the precog cyborg included in Syncfusion : he raises an event before I press a key on keyboard.

Thank you OnpreviewKeyDown ^^.

Gowri Manohari D [Syncfusion]
Replied On September 11, 2009 06:09 AM UTC

Hi Stephane,

Thank you for your update.



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