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

Drop event not firing

Hi,

I want to intercept the drop event, but it does not seem to be firing.
Looks pretty straight forward, but I'm obviously missing something.

I have the following on my aspx page:

function drop(cancel, element, model, type) {
                alert('In drop');
            }

<ej:Diagram ID="DiagramContent" runat="server" Height="100%" Width="100%" ClientDrop="drop" OnClientDrag="drag">
            </ej:Diagram>


Initially I just had function drop(args), but that didn't work either.
I also tried identifying the drop handler in code behind using: DiagramContent.ClientDrop = "drop";

What am I doing wrong?

Thanks in advance

Jim


3 Replies

SG Shyam G Syncfusion Team November 19, 2014 12:24 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Please note that if you are using a Diagram builder application, We have already triggered  a “drop” event on client side in the “diagrambuilder.js” file. If you trigger a “drop” event in server side in the same Diagram builder application then the “drop” event will not be triggered. So we suggest you to remove the client side “drop” event of “diagram.model.drop = nodeondrop;in  the “diagrambuilder.js” file and use the server side “drop” event. Please see the code snippet below to use the server side “drop” event.

Here is the code snippet

 

DiagramContent.ClientDrop = "drop";

 

function drop() {

   

}

We have attached sample below for your reference.

Please let me know if any concerns.

Regards,

Shyam G


Attachment: DiagramBuilder_sample2065910574_100f4ac7.zip


JJ Jim Jacobs November 19, 2014 03:20 PM UTC

Hi Shyam,

I followed your advice and the drop event is working fine now.
Thanks

Jim


SG Shyam G Syncfusion Team November 20, 2014 04:20 AM UTC

Hi Jim

Thanks for your reply.

We are happy to hear that the problem is resolved.

Please let me know if any concerns.

Regards,

Shyam G


Loader.
Live Chat Icon For mobile
Up arrow icon