Webix Tree to Webix datatable

Hi,
I am trying to implement webix tree on left side and data table on right side. when i dragged item from webix tree into data table, it should call REST api and receive SSE events for that dragged item and display event data on data table along with dragged item full path.

can you please show some idea on how to do it

@Dzmitry Thank you so much for help…

@Dzmitry Can you please give some idea on how to use SSE using webix. and Is it possible to get full path of selected item from tree view?

Hello @ganeshkp,

can you please show some idea on how to do it

Unfortunately, I will not be able to provide you with an example utilizing SSE (Server-sent Events). That said, a general example could look something like this: https://snippet.webix.com/2dgwoz5l.

A few notes:

I am trying to implement webix tree on left side and data table on right side. when i dragged item from webix tree into data table

The DnD feature in this case is mainly done with the help of the drag: true property, please note that some modifications to the drag context are needed.

it should call REST api and receive SSE events for that dragged item

As previously mentioned, I am not able to include SSE interactions within this snippet, instead I am making a simple call to the server in a RESTful way, the exact implementation depends entirely on your specific use case.

display event data on data table along with dragged item full path.

I am not sure what you mean by “full path”, but you can display any data in the drop target location (as you can see from the manipulations with context from before). To display the data we gou from our request I am using a custom template.

@Dzmitry Thanks for information…This code helps me some extent.

@Dzmitry Is there any way to find all parent node names separated by / till to root node.

Ex: If tree leaf node name is node4 which is selected to drag, then i would like to have full path like till root node(node1):
/node1/node2/node3/node4

Please help me to find full path of node names for selected node

@ganeshkp
try to iterate parent nodes
https://snippet.webix.com/2rsque53

@integral Thanks for reply.

But i would like to get parent id of selected item from tree view and dragged into table view. getParentId method is available in treeview. but not in datatable view.

My intention is to get tree full path of selected item when i dragged into datatable.

Please refer this code for example:
https://snippet.webix.com/2dgwoz5l

You can pass the full path via the DnD context - https://snippet.webix.com/6w7t9bqx.

You have probably figured it out already, but I’d like to include the example just in case - https://snippet.webix.com/6vklcsxs. You can get the item’s value with the help of the getItem() method.

@Dzmitry Thank you so much. this still helped me.

Thank you