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
close icon

Cancel

Hi,
In my application , i create an OrthogonalConnector between 2 nodes programmatically.See attachment.
When the user presses the "delete" key and the mouse points at one of the nodes ,
i catch the event diagram.Model.EventSink.NodeCollectionChanging.
Inside the event,i want to cancel the deletion by running the command :
(CollectionExEventArgs) e.cancel=true;
I attached the function content(NodeCollectionChanging.txt)

After execution , the node is indeed not deleted,but the problem is that the value of Node.Edges.Count is 0.
That means ,that the deletion command was cancelled only partially.
What should i do in order to cancel the deletion completely?

Thanks ,

Shimon.




Shimon_2363dfc7.zip

9 Replies

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

Hi Shimon ,

The problem is that the connection gets disconnected when you cancel the NodeCollectionChaging event. So it returns the EdgeCount as zero. We will forward this issue to our developer and I will get back to you with more details regarding this issue on or before 6th June.

As a workaround, please connect the nodes again after cancel the NodeCollectionChaging event. Please refer to the following code snippet.

void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
OrthogonalConnector m_conn = evtArgs.Element as OrthogonalConnector;
if (evtArgs.Element is OrthogonalConnector && evtArgs.ChangeType == CollectionExChangeType.Remove)
{
evtArgs.Cancel = true;
m_rect.CentralPort.TryConnect(m_conn.HeadEndPoint);
m_rect1.CentralPort.TryConnect(m_conn.TailEndPoint);
}

}

Please refer to the attached sample that demonstrates this completely. In this sample when you click on File->EdgeCount menu item after press the delete key you can get the exact EdgeCount.

http://www.syncfusion.com/Product/uploads/QuickStart_4d6b0530.zip

Please let me know if this helps.

Regards,
Nagaraj



AD Administrator Syncfusion Team June 10, 2008 01:42 PM UTC

Hi,
Thanks for your reply,but i think that it did not answer my question.
In the code snippet,the connector was deleted,but my problem was in a case when the node itself was deleted , the deletion was cancelled,but the node.edges value was 0.

Thanks,

Shimon.



J. J.Nagarajan Syncfusion Team June 12, 2008 12:28 PM UTC

Hi Shimon ,

Please refer to the modified sample. In this sample when delete a node or a connector, the removing action is cancelled. After press delete key when you click on File->EdgeCount menu item, it shows the exact EdgeCount.

http://www.syncfusion.com/Product/uploads/QuickStart_5e2a8274.zip

Please refer to it and let me know if this helps.

Regards,
Nagaraj



AD Administrator Syncfusion Team August 7, 2008 12:24 PM UTC

Hi,
in my application,i want to disable the option to delete multiple symbols.
(the user should be able to select multiple symbols,but he will not be able to delete them).
How can i disable/cancel this operation without disconnecting the node's edges ?

the workaround of reconnecting the edges will not help in this case (multiple nodes with multiple edges).

Thanks.



J. J.Nagarajan Syncfusion Team August 8, 2008 07:35 AM UTC

Hi Shimon ,

This issue has been fixed in v6.3.0.30 and the later versions. You can download our latest version from the following page.

Latest main release(v6.3.0.30)
http://www.syncfusion.com/downloads/latestversion/default.aspx

Latest Development build(v6.3.0.34)

http://www.syncfusion.com/downloads/product/Build.aspx

Unlock key:

If your Essential Studio license is current,you will be able to obtain the key to install this version from your account in DirectTrac Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com

Please let me know if you have any problem in this version.

Thanks,
Nagaraj



AD Administrator Syncfusion Team August 11, 2008 12:37 PM UTC

Hi,
I installed the new version.
It indeed solved my problem.writing in code "e.cancel" leaves the edges connected to the node.
My problem is that I want to allow user to delete a node and all its children (the nodes which are connected to him with LineConnector).
In the prev. version - 5.1.1.19, i could have reached the children through the Node's edges,but in the new version ,after pressing "delete", the edges collection is null though the edges still exist.
I saw that this problem is a known bug -

http://www.syncfusion.com/support/forums/message.aspx?MessageID=20459

Do you plan to fix it? Is there any workaround to my problem ?

Thanks,

Shimon.



J. J.Nagarajan Syncfusion Team August 11, 2008 12:55 PM UTC

Hi Shimon,

I have consulted with our developer and our developers are currently working on this issue. This fix will be available on or before August 14th, 2008. I will get back to you with the fix on or before 14th August, 2008.

Thanks for your patience.

Thanks,
Nagaraj





AD Administrator Syncfusion Team August 13, 2008 07:54 AM UTC

Great.I'm looking forward to it.



J. J.Nagarajan Syncfusion Team August 14, 2008 12:55 PM UTC

Hi Shimon ,

I regret for this long delay in getting this issue solved. Our developer have been repeatedly encountered with some issues that makes this delay in getting this issue resolved. We will try to fix the issues at the earliest possible for sure. This fix will available on or before 2nd September, 2008. I will get back to you with the patch on 2nd September.

Thanks,
Nagaraj


Loader.
Live Chat Icon For mobile
Up arrow icon