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 cancel the OnClientNodeCollectionChange event

Hi,

I have a requirement similar to this one from your Windows Diagram forum:

https://www.syncfusion.com/forums/79232/delete-node-with-confirmation

Depending on which node(s) are being deleted, I want to issue a prompt to the user confirming this action.
If they select Not to proceed, how do I cancel the remove operation?

Typically, you have the option to cancel the event - leaving everything just the way it was.

How do I accomplish this using the asp.net diagram control?

Thanks

Jim

2 Replies

JJ Jim Jacobs July 5, 2015 02:44 PM UTC

Hi again,

I have also put in place a keydown event handler in which I am attempting to prevent the Delete key from actually firing.
My intent was to ignore the user hitting the Delete key, and require them to use the Trashcan toolbar icon.
Unfortunately, the OnClientNodeCollectionChange event fires before the keydown event, which I find strange.

I thought this additional information would be useful to you in forming your reply.

Thanks

Jim


SG Shyam G Syncfusion Team July 6, 2015 01:35 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Please note that when we press the delete key by selecting the nodes/connector, the nodeCollectionChange event triggers and it is a default behavior of our control. However we have implemented the feature “commandmanager”  in which you can decide whether to delete the node/connector or not. Also you can perform your operation using commandmanager in the Application level. This feature will be available in our volume 2,release, which is scheduled to release in the second week of July, 2015.

Please let me know if any concerns.

Regards,
Shyam G

Loader.
Up arrow icon