The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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 ?
GMGowri Manohari D Syncfusion Team 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.
Regards, Gowri
SGStephane GuerillotSeptember 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 ^^.
GMGowri Manohari D Syncfusion Team September 11, 2009 06:09 AM UTC