Drag and Drop

Hello Webix Team,

https://webix.com/snippet/83f84d02

When I drop a node from tree to table, I am trying to append <p> tag to cell of table and it is getting appended too. But my horizontal scroll of table view is getting removed.

Can you please suggest a solution for this.

Thanks,

Hello! Could you, please, write more detailed description of your use-case?
Do you want to add new row in datatable after Drag-and-Drop between tree and datatable or something else?
Current implementation adds a custom node directly into the HTML structure of the datatable. It interrupts the sizing logic and other key features of the datatable.

Like this https://webix.com/snippet/409ee282

If you want just to add the row from tree to datatable, there’s no need to use DragControl.
You can add the parameter drag:"target" to the datatable
and use <a href = "https://docs.webix.com/api__dragitem_onbeforedrop_event.html">onBeforeDrop</a> to define the logic of adding a new item. This event fires before a dragged element is released over the droppable area with such properties as context and event.
Here is an example: https://webix.com/snippet/cb6a6059

Hi Webix Team,

I want to append a data to single table cell/column only. Don’t want to add a whole row in a table.

https://webix.com/snippet/83f84d02

Please note that direct changes in the DataTable HTML structure may result various errors. In any case, you can work with the component API and JS configuration. In this particular scenario, you can work with data items and update them with the necessary data and in onBeforeDrop write any logic. For example, use <a href = "https://docs.webix.com/api__link__ui.proto_updateitem.html">updateItem</a> on the element in which the drop is made
Here is an example: https://webix.com/snippet/61d3cef2

Hello,

I want the webix table to look like this in following snippet.
https://webix.com/snippet/ea28d14d

In which I will append the ‘Row 2, Column 1’, ‘Row 3, Column 1’ data on drop event.

Thanks

You can implement it by empty rows or use <a href = "https://docs.webix.com/api__ui.datatable_spans_config.html">spans</a> that is adds rowspan to the datatable. But there, before using the spans, you should know the count of cols
Here is an example: https://webix.com/snippet/f9c7ca0a

Hi Nastja,

Thank you so much for great help.

Hi Nastja,

How I can manage this view if my column ids are dynamic and how I can handle the scenario on webix.DragControl.addDrop() event.

https://webix.com/snippet/cbb65212

Hello, Tejal!
DragControl is already implemented in data components (tree, datatable, etc.) as a built-in feature that explained in our docs ( https://docs.webix.com/desktop__dnd.html ) and in the above demo. Enabled via simple drag:true, it provides all needed features and possibilities for setting your own DnD behavior using dnd-related events.
Usually, re-adding this mixin considered as a bad practice. Can you please explain, is there a reason or a use-case where the available features are not enough?