Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
igTree - adding nodes client side
posted

Hi,

I'm trying to add a node to a tree that has loadOnDemand: true, on client-side.  I can't find anything in the API that allows adding a node, and I can't seem to add it to the data source and re-bind since the data source is loaded on demand.  Is there perhaps a way to modify the current set of loaded nodes?

For example, take the tree below, given that the 100/200/300 nodes are loaded initially, and then the 010/020 nodes and 001/002/003 nodes are loaded on demand when their parent is expanded.  If I want to add a node "Node 004" as another child of Node 010 (it would be a sibling to nodes 001/002/003), is that possible on client-side?

  • Node 100
    • Node 010
      • Node 001
      • Node 002
      • Node 003
    • Node 020
  • Node 200
  • Node 300
  • ...

Thanks,
-Jared

Parents
  • 5105
    Suggested Answer
    Offline posted

    Hi there Jared,

    Currently there is no add/delete node functionality implemented internally. However you can achieve the desired functionality. You can add objects to the data source and rebind the tree. What this would do is rerender the tree with the new data and the new node would be there then.

    Please let me know if this helps, or if you need additional information. I would be glad to help you further!

Reply Children