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

Add/Edit/Delete node (n-level) in Treeview using context menu

1 Answer 579 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Prabhakar
Top achievements
Rank 1
Prabhakar asked on 15 Mar 2017, 09:56 PM

Could you please check the below and let me know your suggestion

How to load Tree view with nested nodes (n-level) and context menu (Add/Edit/Delete) for CRUD operation of all nodes

 

Thanks,

Prabhakar.P

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 17 Mar 2017, 03:30 PM
Hello Prabhakar,

The number of nested levels will depend on the data you have in the data source that you set to the TreeView. More information on the data source the widget uses is available in the API documentation.
As for Crud operation the TreeView is not designed to do such automatically. If you want to Add/Delete nodes you can do so through the API calling the respective TreeView methods (append or remove) depending on the selection in the ContextMenu. Here's a sample dojo demonstrating how this can be done, which can get you started.
As for editing a node, the TreeView exposes a text method, which allows the text of a node to be set. So for example you can provide the user with a textbox, which they can enter the desired node text into and you can then call the method passing to it the textbox value.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TreeView
Asked by
Prabhakar
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or