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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag and Drop first element in the tree view

Thread ID:

Created:

Updated:

Platform:

Replies:

151353 Feb 7,2020 02:01 PM UTC Feb 7,2020 07:59 PM UTC Angular - EJ 2 1
loading
Tags: Treeview
Samir Modi
Asked On February 7, 2020 02:01 PM UTC

Hi, 

I have implemented drag and drop functionality. It is working fine for all the items except the first one. I do not get the updated model when I drag the first element and I get below error -

ERROR TypeError: Cannot read property '0' of undefined
    at TreeViewComponent.push../node_modules/@syncfusion/ej2-navigations/src/treeview/treeview.js.TreeView.moveData (treeview.js:3076)
    at TreeViewComponent.TreeView.dropAsChildNode (treeview.js:3043)
    at TreeViewComponent.TreeView.appendNode (treeview.js:3007)
    at TreeViewComponent.TreeView.dropAction (treeview.js:2984)
    at Droppable.drop (treeview.js:2866)
    at Observer.notify (observer.js:99)
    at Droppable.Base.trigger (base.js:152)
    at Droppable.intDrop (droppable.js:95)
    at Draggable.intDragStop (draggable.js:467)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)

Can you please help me with this issue?

Thanks,
Samir

Shameer Ali Baig Sulaiman Ali Baig [Syncfusion]
Replied On February 7, 2020 07:59 PM UTC

Hi Samir, 
 
Greetings from Syncfusion support. 
 
We have looked into your reported problem in TreeView and we tried to replicate the reported issue at our end. But, the reported issue was not reproduced, as the Drag and Drop functionality in TreeView component is working properly and it does not thrown the reported script error. 
 
Please, the sample which we have prepared for your reference. 
 
 
 
 
Please, check the sample, let us know whether this sample resolves your reported problem.  
 
If the reported issue still persists, then please share us more details regarding your reported problem. 
 
·        Issue reproducing scenario and your exact requirement details. 
·        Share us the code sample in which you face this problem. 
·        Screenshot or video sample of the reported problem. 
·        If possible, could you please replicate the reported issue in our attached sample and share it to us? 
 
This information would help us to understand your exact problem and provide you the prompt solution. 
 
Regards, 
Shameer Ali Baig S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon