Dragh-And-Drop mode change for datatable

Hello,

I have a datatable for which I want to use the ‘order’ drag mode so the user can reorganize rowes in the table. But I also need the datatable to be a target for a tree widget that has the drag mode set to ‘source’. The datatable rows cannot be moved outside the datatable. How can I best accomplish a combination of ‘order’ and ‘target’ as the drag mode for the datatable?

Thanks,

Hello @Pieter ,

How can I best accomplish a combination of ‘order’ and ‘target’ as the drag mode for the datatable?

Unfortunately, order and target mode cannot be combined in the component.

As a solution, I would suggest using a custom DnD processing with order-like positioning and ability to process drop from an external source.
Please, take a look at the next example:
https://snippet.webix.com/x5hupinh

However, there is a feature of DnD which should be mentioned: while the position of a dragged HTML element could be limited by $dragPos method, the actual drop target is taken from the cursor position.

Thanks you for that example.