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.
Unfortunately, activation email could not send to your email. Please try again.

NodeCollectionChanging evt.cancel

Thread ID:

Created:

Updated:

Platform:

Replies:

71543 Feb 5,2008 08:22 AM Feb 12,2008 12:02 AM Windows Forms 6
loading
Tags: Diagram
Shavit Roee
Asked On February 5, 2008 08:22 AM

Hello
I have a diagram with one node, I want to prevent the following behavior:
When the node is selected, the ctrl key is pressed and we are dragging the node ,it is been copied
What I am doing to prevent this from happening is:
void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (Control.ModifierKeys == Keys.Control )
{
evtArgs.Cancel = true ;
}
}
The result is a red cross and an exception
1.why is the evt.cancel not working ;
2.how can I avoid this behavior.

10x Roee






Melba Winshia [Syncfusion]
Replied On February 7, 2008 03:11 AM

Hi Shavit,

Thank you for your interest in Syncfusion Products.

I am afraid that I was not able to reproduce this issue (Red Cross and an exception). Also I have created a simple sample to test this issue and it is available in the below link:

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

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Thanks,
Melba



Shavit Roee
Replied On February 7, 2008 07:34 AM

Hello,
I think that my original message was not clear
I need the cancel event to work meaning that the added Node will be removed from the diagram or i miss understood the evt.cancel =true;
How can i remove the added nOde it

10x again ,



>Hi Shavit,

Thank you for your interest in Syncfusion Products.

I am afraid that I was not able to reproduce this issue (Red Cross and an exception). Also I have created a simple sample to test this issue and it is available in the below link:

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

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Thanks,
Melba





Melba Winshia [Syncfusion]
Replied On February 8, 2008 07:59 AM

Hi Shavit,

Thank you for the update.

Issue: evt.cancel not working

I am able to reproduce this issue. The issue mentioned here is suspected to be a defect and we have sent this to our development team for more analysis. To facilitate tracking the progress of the fix, and timely resolution, we have created an incident #41343 in our incident database Direct Trac.

Please let me know if you have any concerns.

Thanks,
Melba


J.Nagarajan [Syncfusion]
Replied On February 8, 2008 04:39 PM

Hi Shavit ,

If your intention is to prevent the Copy paste functionality while pressing control key and drag the node then you need to prevent the movement of nodes when pressing control key. You need to handle KeyDown and KeyUp event of the diagram control.

The attached sample demonstrates this behavior completely.

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

Please refer to it and let us know if you have any questions.

Please let me know if you have any questions.

Regards,
Nagaraj



Shavit Roee
Replied On February 10, 2008 06:42 AM


Hello ,
I tried to use your solution the only thing is that the problem raises again, when I am selecting 2 Nodes I can "Copy " them using the control key and dragging ,is there any other way I really need to solve this bug .
10x Roee Shavit


>Hi Shavit ,

If your intention is to prevent the Copy paste functionality while pressing control key and drag the node then you need to prevent the movement of nodes when pressing control key. You need to handle KeyDown and KeyUp event of the diagram control.

The attached sample demonstrates this behavior completely.

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

Please refer to it and let us know if you have any questions.

Please let me know if you have any questions.

Regards,
Nagaraj





Melba Winshia [Syncfusion]
Replied On February 12, 2008 12:02 AM

Hi Shavit,

We suspect the issue of evtArgs.cancel not working for NodeCollectionChanging event to be a defect and to facilitate tracking the progress of the fix, and timely resolution, we have created an incident #41343 in our incident database Direct Trac. Please follow this issue in that incident.

Thanks,
Melba




CONFIRMATION

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.

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.

;