This is a migrated thread and some comments may be shown as answers.

Get all nodes details after add/remove

1 Answer 70 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Murugaraj
Top achievements
Rank 1
Murugaraj asked on 10 Jun 2020, 10:57 AM

Wanted to get the source treeview and destination treeview nodes data(including child), when you move node from one treeview to another treeview. Is there any way I can get it?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 12 Jun 2020, 09:07 AM

Hello Murugaraj,

Using the TreeView drag and drop editing directive, the child nodes are moved automatically.

If you want to handle the events manually, it's important to know what is the structure of your data and do you have it loaded locally. When using local hierarchical data, the child items are moved with the parent item. When using local flat data, you will have to acquire the child nodes yourself. The editing directive uses the children function to recursively collect all child nodes. Here's an example. The child nodes of the clicked item are logged to the console.

If that doesn't solve your problem, I'd have to ask for more details about setup, data structure, data availability (local or loaded on demand for each newly expanded node). A runnable example would be best.

Looking forward to hearing back from you.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
TreeView
Asked by
Murugaraj
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or