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?
Thanks,-Jared
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!
Hi Konstantin, thanks for your response.
Rebinding is fine, but since I'm using loadOnDemand functionality my data source is on the server side, so the igTree is downloading parts of the data each time nodes expand by making calls to the server. Does the igTree keep an accessible client-side copy of the partial data source that has been loaded thus far when expanding various nodes? If so, I could add the new node to that local data instead of the server data, and rebind the tree to that local data to avoid extra server calls. I've been unable to find something like this in the API so far, so please let me know if it is available.
Hi Jared,
It would be great if you could do that!
Thanks!
Just wanted to know if the above issue was resolved. If yes, could you post a sample here.
Also, can we use dynamic loading in an .aspx page using normal ASP.NET web service, or is OData service required in this case.
Thanks a lot.
Issue was not resolved, I believe it is not possible with current igTree to add nodes on client side without re-binding the tree in this release. Hoping this will be included soon in a future release.
As to your other question, I'm currently able to do dynamic loading from an MVC controller action, very similar to a regular ASP.NET web service. The action returns data in JSON notation, so the tree does not appear to be limited to OData sources.
Hi there,
You are correct about the igTree not supporing adding and deleting of nodes at this point. You can use a custom service with the igTree, it is not limited to oData. I have explained the request parameters for each load on demand request in the following forum post:
http://community.infragistics.com/forums/t/65356.aspx
Thank you for using the Infragistics forums!
Do you have plans to introduce client-side tree modification functionality in the nearest future?
Thanks.
Hello adogg,
This blog post will most probably be interesting to you: https://ko.infragistics.com/community/blogs/b/engineering/posts/the-infragistics-tree-with-a-context-menu
Hi adogg,
We do have plans to have such functionality in the near future. Please follow the updates on the Infragistics blogs in order to receive more information about the future releases.
Sincerely,