Drag and Drop issue

I am trying to drag and drop from a Treeview onto a Diagram from inside a modal window.  When I drop the item nothing happens.  I don't even get an error.  I can see that my function OnDataNodeDragged is called, and the item I am dragging is giving a value, but nothing is getting added to the NodeCollection when using NodeCollection.Add().  Is this happening because I'm inside a modal?  When I do the same thing outside of a modal all works fine.


3 Replies

GG Gowtham Gunashekar Syncfusion Team July 21, 2021 11:50 AM UTC

Hi John, 
 
On the further analysis of the shared detail, you have mentioned that you have rendered a diagram and treeview component inside some model window and you did not share the details about the model window, please ensure what type of component that you have used as model window to wrap the diagram and treeview componentWe request you share with us more details about your issue which you are facing like sharing with us a simple sample to replicate the reported issue or please replicate the reported issue in the shared sample, that will help us to go ahead further.  
 
 
Regards,  
Gowtham  



JO John July 21, 2021 12:56 PM UTC

I am using the SFDialog to hold a SFTreeview and and SFDiagram.  I am using the example you sent on a the same singlepage app and want to use the modal to hold a different Diagram.  The Treeview works okay and I can drag, but the NodeCollection is not added to.  I have attached a copy of the code I am using for my modal.


Attachment: ModalWindowDragAndDrop_6c0ea810.zip


GG Gowtham Gunashekar Syncfusion Team July 22, 2021 03:08 PM UTC


Hi John,  
 
On the further analysis of the shared sample, we have added some changes and implemented the drag and drops a node from treeview to diagram. We found you did not declare the diagram and treeview inside the DialogTemplates tag of the dialog component and you have also set the diagram width and height as “100%”, if you set the diagram’s width as “100%” means diagram inherits width property the from its parent element(div). If the parent element also has height and width as “100%” means diagram parent element div inherit the height from its parent element vice versa, if none of its parent or grandparent have the width in pixels means the diagram will render with 0,0 size. so please ensure that any of the parent elements have width in px.   
   
We have added the suggested changes to the sample below.  
 
 
Regards, 
Gowtham 


Loader.
Up arrow icon