Editable Tree

Extension » Editable Tree

Create Tree

Set the url,createUrl,updateUrl,destroyUrl and dndUrl properties to automatic synchronization data from client to server.

  • url: return tree data.
  • createUrl: When create a new node, the tree will post a parameter named 'parentId' that indicated the parent node id to server. The server should return the added node data. The code below shows the added node data example:
    {"id":1,"text":"new node"}
  • updateUrl: When update a node, the tree will post 'id' and 'text' parameters to server. The server do updating action and return the updated node data.
  • destroyUrl: When destroy a node, the tree will post 'id' parameter to server. The server return the {"success":true} data.
  • dndUrl: When drag and drop a node, the tree will post the following parameters to server:
    id - the dragged node id.
    targetId - the node to be dropped id.
    point - indicate the drop operation, posible values are: 'append','top' or 'bottom'.
    The server do some actions and return the {"success":true} data.


The methods extend from tree, below is the added methods for etree.

Name Parameter Description
options none Return the options object.
create none Create a new node.
edit none Edit the current selected node.
destroy none Destroy the current selected node.

Download the EasyUI Extension: