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

Drap and drop between TreeViews but not within "source" TreeView

Hello,

I implemented drag and drop between TreeViews as described here. Works well.

However while I want to allow dragging an item from the left control to the right control I do not want to allow drag and drop within the control on the left side.

I was trying to achieve my requirement by using the event "OnNodeDragStop", however I can not find something like target control Id within the event properties.

T


12 Replies

SA SureshRajan Alagarsamy Syncfusion Team March 30, 2023 05:29 PM UTC

Hi Daniel,


We appreciate your patience as we worked to address your request for restricting the drag and drop action within the same control in the TreeView component. While we attempted to achieve your requirement using invoke method in the “OnNodeDragStop” event, we were unable to fully meet your requirements due to Blazor behavior.


We need some additional time and will update you with further details on or before April 3, 2023.


Regards,
Suresh.



JA Jacky March 31, 2024 01:28 AM UTC

Hi  Suresh,

I use vs 2022 update last + .net 7, My Controls update to 25.1.37 use  Drap and drop 2 TreeView,

Drag the right node (JACKY) From Right to Left, If Left Tree is Root(/) or Last Child (jj JS Lin) , I can get the Dropped item from EventArgs, but the Folder (DGM 總經理) not work and get null. as follow picture.

Or  Dropped  node can be get by Invoke JS ?


For your reference, Please kindly help !


Another question : what the best way to get the Dragged and Dropped node by invoke JS or EventArguments ?


Best Regards!

Jacky


Test Dragged to 3  nodes :

Image_8767_1711847410768

(1) , (2) can get the Dropped item

Image_1677_1711847159565

 (3) not work get null