Hi - We are using a tree view which has 3 levels of data. (Adjacency ==> Group ==> Subgroup)
Initially when the page is loaded the root node would have all Adjacency's as child nodes.
On a node selection changed event ("igtreeselectionchanged"), the child data is loaded by making Ajax call. In the Ajax call's done method, the first line of code is as below
var nodes = $hierarchy.igTree("children", ui.newNodes[0]);
This line works fine when the a particular node is clicked for first time.
If node is selected for the second time (i.e. after selecting some other node), the above line of code throws error.
Can you please let me us know, how we can avoid the above line of code to not throw error second time around.
Thanks Kiran
Hello Kiran,
Thank you for contacting Infragistics!
I have done some looking into this matter and have the following information and questions.
What is the error you are receiving?
When I set the method you mention from the Selection changed event I get an error the first time I use it. The error is happening because it doesn’t recognize what is being passed in. If I use the following code I am able to get the child nodes now many how many times I select:
var nodes = $("#tree").igTree("children", ui.newNodes[0].element);
Please let me know if you have any further questions concerning this matter.