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

2 posts, 0 answers
  1. Prabhakar
    Prabhakar avatar
    2 posts
    Member since:
    Oct 2016

    Posted 15 Mar 2017 Link to this post

    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




  2. Ivan Danchev
    Ivan Danchev avatar
    2063 posts

    Posted 17 Mar 2017 Link to this post

    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.

    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.
Back to Top