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
795
igxTree - How to display hierarchal data?
posted

This question is specifically for the igxTree, NOT the igxTreeGrid.  I need to display a tree but do not need any other columns or the overhead of the grid.  The TreeGrid has a property called ChildDataKey but I don't see anything on the IgxTree for loading nested data.  I can return the data two ways from my API, 1: flat with each record having it's parentid or 2: already nested with a Children property.

From what I can see, all the igxTree samples, one has to explicitly declare every level of the tree and then write some small script in every level?  Am I missing something?

Can you please provide a sample of how to get igxTree to load nested data (unknown number of levels)?

Also, worst case, is there any way to programmatically add the nodes to the igxTree?

thank you

  • 1560
    Offline posted

    Hello,

    I have been looking into your question, however, what I could say is that as it is mentioned into the Limitation section of the Tree topic all nodes of the igx-tree should be declared manually, so loading unknown numbers of levels or adding/deleting nodes is not provided out of the box.

    For such scenarios, I could recommend using the IgxTreeGrid and defining some custom styling in order to achieve your requirement.

    Please let me know if you need any further assistance regarding this matter.


    Sincerely,
    Teodosia Hristodorova
    Software Developer