Drag-Drop between 2 treeviews, client-side events

Posted by: gsauns on 10 September 2017, 11:34 am EST

  • Posted 10 September 2017, 11:34 am EST

    I have 2 C1TreeViews that both allow DragDrop.


    They are intended to have nodes dragged-and-dropped between the two. This part works fine. I drag from one to the other, and the node moves.


    The problem I am encountering involves the fact that I have ClientNodeDropped events on both treeviews that do separate things. When I drop a node from one to the other, it maintains the ClientNodeDropped event from its ORIGINAL treeview. I want it to now take the event from its NEW treeview.


    I have tried initializeChildNodes() and createChildNodes on the event that fires when I originally drop, but this does not accomplish what I am trying to do. I have also tried canceling the actual drag-drop event and using Javascript code to add the node to the desired treeview, but this has the exact same effect.


    Any ideas?


     

  • Replied 10 September 2017, 11:34 am EST

    Yes, that is the case. When I drag a node from TreeView1 to TreeView2, it fires TreeView2's event.


    However, once I drop ANOTHER node from TreeView1 onto THAT SPECIFIC NODE on Treeview2, that will fire TreeView1's event. It seems that the event stays with the node and is not specific to the TreeView.


    My WebUI version is 2.0.20093.148


    My C1.Web.UI.3.dll version is 3.5.20093.68

  • Replied 10 September 2017, 11:34 am EST

    Hello,


    When you drag a node from C1TreeView1 and drop it on C1TreeView2, C1TreeView2's OnClientNodeDropped event should be the event that fires.  Is this not the case for you?  If so, what version of the C1TreeView are you using? 


    Thanks,


    -Raleigh

  • Replied 10 September 2017, 11:34 am EST

    Hello,


    Thank you for reporting this.  I was able to reproduce the problem and it will be fixed in the next version (.195).


    Thanks,


    -Raleigh

  • Replied 10 September 2017, 11:34 am EST

    My fault, my reference was to Controls.3. When I changed to Controls.2 it worked.

  • Replied 10 September 2017, 11:34 am EST

    I have now updated to version .196 and the issue is NOT fixed.

  • Replied 10 September 2017, 11:34 am EST

    Hello,


    I just tried version .196, and everything appears to be working fine in my tests.  Are you sure that you project has been properly updated (you can check the C1TreeView's about box)?  Can you please send me a sample?


    Thanks,


    -Raleigh

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels