Drag Drop nodes in between two WjTreeView with different itemssource

Posted by: gkukko on 24 May 2018, 5:04 am EST

    • Post Options:
    • Link

    Posted 24 May 2018, 5:04 am EST

    Hi,

    I am using WjTreeView for showing Tree, which works perfectly fine. I have two tree with different itemssource (different property set), and want to bind data from one tree to another tree.

    I have checked the TreeView intro, but looks like it only provides dragover event. I am trying to find actual drop event and in that I want to manipulate the data before inserting into other tree.

    Is there any way to achieve this?

  • Posted 25 May 2018, 7:11 am EST

    Hi,

    You need handle the drop event for TreeView control.

    Please refer to the following sample:

    https://stackblitz.com/edit/angular-qaafg5?file=app%2Fapp.component.html

    Let us know for any further queries.

    ~Manish

  • Posted 26 May 2018, 9:24 am EST

    Thanks Manish.

    I have another quick question - Is it possible to drag drop item from different controls

    e.g. from wj-list-box to wj-tree-view or from wj-grid to wj-tree-view?

    Regards,

    Praveen

  • Posted 27 May 2018, 11:51 pm EST

    Hi,

    The Wijmo control uses the standard HTML5 drag/drop API, so you may create custom drop targets for nodes by handling a few HTML events. For example:

    http://jsfiddle.net/Wijmo5/to263rrm/

    For details about the standard HTML5 drag/drop API, see here:

    https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API

    ~Manish

  • Posted 28 May 2018, 8:37 am EST

    Thanks Manish.

Need extra support?

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

Learn More

Forum Channels